summaryrefslogtreecommitdiff
path: root/pylint/test/functional/using_constant_test.py
Commit message (Collapse)AuthorAgeFilesLines
* Stopped installing tests with packageAshley Whetter2019-06-201-142/+0
|
* Add a new ``missing-parentheses-for-call-in-test`` checkhippo912019-03-191-8/+9
| | | | | | This is emitted in case a call to a function is made inside a test but it misses parentheses. It is a more specialised form of `using-constant-test`, but tailored specifically to callables. Close #2658
* Fix TypeError in test_good_comprehension_checksBenjamin Drung2018-09-281-7/+7
| | | | | | | | | | | | | | | | | The following expression from test_good_comprehension_checks will fail to execute, because the list element from the range function has the type int and int has no len method: ``` >>> [data for data in range(100) if len(data)] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 1, in <listcomp> TypeError: object of type 'int' has no len() ``` Use the built-in `abs` method instead of the `len` method to make the test case a little bit more realistic.
* Fix Windows newlines (CRLF) to Unix newlines (LF)Benjamin Drung2018-09-281-141/+141
| | | | | | | | | | | | | | | | | | Several files in pylint/test/functional have Windows newlines (CRLF) instead of Unix newlines (LF). To list these files, run: ``` find . -type f -exec file "{}" ";" | grep CRLF ``` This commit corrects the line endings of the file that the following commit will touch by running following command: ``` perl -pi -e 's/\r\n/\n/g' pylint/test/functional/using_constant_test.py ``` Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
* adapt existing test cases for useless-object-inheritance.ssolanki2018-06-211-1/+1
| | | | | | | | | | adapt existing test/input test cases to new check. add some more positive test case for useless-object-inheritance msg code was in conflict with existing msg. adapt existing test cases for new checker.
* Adding a check for ``inconsistent-return-statements`` inside function or ↵hippo912017-09-261-0/+1
| | | | | methods. (#1641) Close #1267
* add a new rule looking for yoda conditionsLaura Médioni2015-10-151-0/+1
|
* Support using-constant-test for comprehensions.Claudiu Popa2015-06-081-1/+21
|
* Add a new warning, 'using-constant-test'.Claudiu Popa2015-05-231-0/+119
This new warning is emitted when a conditional statement (If, IfExp) uses a test which is always constant, such as numbers, classes, functions etc. This is most likely an error from the user's part. Closes issue #524.