summaryrefslogtreecommitdiff
path: root/tests/test_check_parallel.py
diff options
context:
space:
mode:
authorJaehoon Hwang <jaehoonhwang@users.noreply.github.com>2021-10-17 00:31:34 -0700
committerGitHub <noreply@github.com>2021-10-17 09:31:34 +0200
commit59d2b545b557a7ac47955c65935889e296da941a (patch)
treea07b8d66954e630e5b8181d175fff60c423b93c7 /tests/test_check_parallel.py
parent9098c6078551e2d3028fe65537d3b0e407c85724 (diff)
downloadpylint-git-59d2b545b557a7ac47955c65935889e296da941a.tar.gz
Add a warning ``use-implicit-booleaness-not-comparison`` for comparison with collection literals (#5120)
* Create a new checker; use-implicit-booleanness checker where it looks for boolean evaluatiion with collection literals such as `()`, `[]`, or `{}` * Fixed invalid usage of comparison within pylint package This closes #4774 * Ignore tuples when checking for `literal-comparison` Closes #3031 * Merge len_checker with empty_literal checker Moving empty literal checker with len_checker to avoid class without iterators without boolean expressions (false positive on pandas) Reference: https://github.com/PyCQA/pylint/pull/3821/files * Update `len_checker` and its class `LenChecker` to `ComparisonChecker` to reflect better usage after merging between `len_checker` and `empty_literal_checker` and its tests. * Fixed `consider_using_in` and `consider_iterating_dictionary` tests that were failing due to new empty literal checkers. Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'tests/test_check_parallel.py')
-rw-r--r--tests/test_check_parallel.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_check_parallel.py b/tests/test_check_parallel.py
index be250d892..32626d902 100644
--- a/tests/test_check_parallel.py
+++ b/tests/test_check_parallel.py
@@ -197,7 +197,7 @@ class TestCheckParallelFramework:
_, # mapreduce_data
) = worker_check_single_file(_gen_file_data())
assert name == "--test-file_data-name-0--"
- assert [] == msgs
+ assert not msgs
no_errors_status = 0
assert no_errors_status == msg_status
assert {
@@ -211,7 +211,7 @@ class TestCheckParallelFramework:
"warning": 0,
}
} == stats.by_module
- assert {} == stats.by_msg
+ assert not stats.by_msg
assert stats.convention == 0
assert stats.error == 0
assert stats.fatal == 0
@@ -241,7 +241,7 @@ class TestCheckParallelFramework:
# Ensure we return the same data as the single_file_no_checkers test
assert name == "--test-file_data-name-0--"
- assert [] == msgs
+ assert not msgs
no_errors_status = 0
assert no_errors_status == msg_status
assert {
@@ -255,7 +255,7 @@ class TestCheckParallelFramework:
"warning": 0,
}
} == stats.by_module
- assert {} == stats.by_msg
+ assert not stats.by_msg
assert stats.convention == 0
assert stats.error == 0
assert stats.fatal == 0
@@ -304,7 +304,7 @@ class TestCheckParallel:
"warning": 0,
}
} == linter.stats.by_module
- assert linter.stats.by_msg == {}
+ assert not linter.stats.by_msg
assert linter.stats.convention == 0
assert linter.stats.error == 0
assert linter.stats.fatal == 0
@@ -328,7 +328,7 @@ class TestCheckParallel:
"warning": 0,
}
} == linter.stats.by_module
- assert linter.stats.by_msg == {}
+ assert not linter.stats.by_msg
assert linter.stats.convention == 0
assert linter.stats.error == 0
assert linter.stats.fatal == 0
@@ -366,7 +366,7 @@ class TestCheckParallel:
"warning": 0,
}
} == linter.stats.by_module
- assert linter.stats.by_msg == {}
+ assert not linter.stats.by_msg
assert linter.stats.convention == 0
assert linter.stats.error == 0
assert linter.stats.fatal == 0