diff options
Diffstat (limited to 'tests/functional/ext/comparetozero')
-rw-r--r-- | tests/functional/ext/comparetozero/compare_to_zero.py | 46 | ||||
-rw-r--r-- | tests/functional/ext/comparetozero/compare_to_zero.rc | 2 | ||||
-rw-r--r-- | tests/functional/ext/comparetozero/compare_to_zero.txt | 6 |
3 files changed, 0 insertions, 54 deletions
diff --git a/tests/functional/ext/comparetozero/compare_to_zero.py b/tests/functional/ext/comparetozero/compare_to_zero.py deleted file mode 100644 index 6a14b8bc9..000000000 --- a/tests/functional/ext/comparetozero/compare_to_zero.py +++ /dev/null @@ -1,46 +0,0 @@ -# pylint: disable=literal-comparison,missing-docstring, singleton-comparison - -X = 123 -Y = len('test') - -if X is 0: # [compare-to-zero] - pass - -if X is False: - pass - -if Y is not 0: # [compare-to-zero] - pass - -if Y is not False: - pass - -if X == 0: # [compare-to-zero] - pass - -if X == False: - pass - -if 0 == Y: # [compare-to-zero] - pass - -if Y != 0: # [compare-to-zero] - pass - -if 0 != X: # [compare-to-zero] - pass - -if Y != False: - pass - -if X > 0: - pass - -if X < 0: - pass - -if 0 < X: - pass - -if 0 > X: - pass diff --git a/tests/functional/ext/comparetozero/compare_to_zero.rc b/tests/functional/ext/comparetozero/compare_to_zero.rc deleted file mode 100644 index 70c6171b5..000000000 --- a/tests/functional/ext/comparetozero/compare_to_zero.rc +++ /dev/null @@ -1,2 +0,0 @@ -[MAIN] -load-plugins=pylint.extensions.comparetozero, diff --git a/tests/functional/ext/comparetozero/compare_to_zero.txt b/tests/functional/ext/comparetozero/compare_to_zero.txt deleted file mode 100644 index a413a3268..000000000 --- a/tests/functional/ext/comparetozero/compare_to_zero.txt +++ /dev/null @@ -1,6 +0,0 @@ -compare-to-zero:6:3:6:9::"""X is 0"" can be simplified to ""not X"" as 0 is falsey":HIGH -compare-to-zero:12:3:12:13::"""Y is not 0"" can be simplified to ""Y"" as 0 is falsey":HIGH -compare-to-zero:18:3:18:9::"""X == 0"" can be simplified to ""not X"" as 0 is falsey":HIGH -compare-to-zero:24:3:24:9::"""0 == Y"" can be simplified to ""not Y"" as 0 is falsey":HIGH -compare-to-zero:27:3:27:9::"""Y != 0"" can be simplified to ""Y"" as 0 is falsey":HIGH -compare-to-zero:30:3:30:9::"""0 != X"" can be simplified to ""X"" as 0 is falsey":HIGH |