summaryrefslogtreecommitdiff
path: root/tests/test_check_parallel.py
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2022-11-01 08:09:28 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2022-11-05 10:43:35 +0100
commita1aee9e3db91c29d6c520600467efd5c86934e23 (patch)
treeec21ef87ee9e74c6addb7ae93186cc41f27dd2cc /tests/test_check_parallel.py
parent51bba373f8c546b84db9aea66a1ac24f3ebf948a (diff)
downloadpylint-git-a1aee9e3db91c29d6c520600467efd5c86934e23.tar.gz
[flake8-bugbear] Do not use 'assert False' but raise 'AssertionError()'
As the former can be removed by interpreter optimisation.
Diffstat (limited to 'tests/test_check_parallel.py')
-rw-r--r--tests/test_check_parallel.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_check_parallel.py b/tests/test_check_parallel.py
index 420ed3d93..d5cdf0715 100644
--- a/tests/test_check_parallel.py
+++ b/tests/test_check_parallel.py
@@ -239,7 +239,9 @@ class TestCheckParallelFramework:
linter.load_plugin_modules(["pylint.extensions.overlapping_exceptions"])
try:
dill.dumps(linter)
- assert False, "Plugins loaded were pickle-safe! This test needs altering"
+ raise AssertionError(
+ "Plugins loaded were pickle-safe! This test needs altering"
+ )
except (KeyError, TypeError, PickleError, NotImplementedError):
pass
@@ -247,8 +249,10 @@ class TestCheckParallelFramework:
linter.load_plugin_configuration()
try:
dill.dumps(linter)
- except KeyError:
- assert False, "Cannot pickle linter when using non-pickleable plugin"
+ except KeyError as exc:
+ raise AssertionError(
+ "Cannot pickle linter when using non-pickleable plugin"
+ ) from exc
def test_worker_check_sequential_checker(self) -> None:
"""Same as test_worker_check_single_file_no_checkers with SequentialTestChecker."""