summaryrefslogtreecommitdiff
path: root/tests/checkers
diff options
context:
space:
mode:
authorJaehoon Hwang <jaehoonhwang@users.noreply.github.com>2021-10-09 23:18:46 -0700
committerGitHub <noreply@github.com>2021-10-10 08:18:46 +0200
commit220e27dc5bdd6bdd9dbee56d5c7d33a946c8ad17 (patch)
treec3f34d216acce183b92b7007f4a38811169d4c66 /tests/checkers
parent661703f3c9f030420d6559433b621abdc27ac7b5 (diff)
downloadpylint-git-220e27dc5bdd6bdd9dbee56d5c7d33a946c8ad17.tar.gz
Rename `len-as-condition` to `use-implicit-booleaness-not-len` (#5132)
Rename `len-as-condition` to be more general for new checker `use-implicit-booleaness-not-comparison` * Refactor `LenChecker` class -> `ImplicitBooleanessChecker`o * Rename test files/`len_checker.py`/`__init__.py` to reflect new name. * Add `len-as-condition` as `old_names` for `use-implicit-booleaness-not-len` Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'tests/checkers')
-rw-r--r--tests/checkers/unittest_refactoring.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/checkers/unittest_refactoring.py b/tests/checkers/unittest_refactoring.py
index 4b132e218..3c87a8d33 100644
--- a/tests/checkers/unittest_refactoring.py
+++ b/tests/checkers/unittest_refactoring.py
@@ -3,7 +3,7 @@
import astroid
-from pylint.checkers.refactoring import LenChecker
+from pylint.checkers.refactoring import ImplicitBooleanessChecker
def test_class_tree_detection() -> None:
@@ -24,23 +24,23 @@ class ChildClassWithoutBool(ClassWithoutBool):
"""
)
with_bool, without_bool, child_with_bool, child_without_bool = module.body
- assert LenChecker().base_classes_of_node(with_bool) == [
+ assert ImplicitBooleanessChecker().base_classes_of_node(with_bool) == [
"ClassWithBool",
"list",
"object",
]
- assert LenChecker().base_classes_of_node(without_bool) == [
+ assert ImplicitBooleanessChecker().base_classes_of_node(without_bool) == [
"ClassWithoutBool",
"dict",
"object",
]
- assert LenChecker().base_classes_of_node(child_with_bool) == [
+ assert ImplicitBooleanessChecker().base_classes_of_node(child_with_bool) == [
"ChildClassWithBool",
"ClassWithBool",
"list",
"object",
]
- assert LenChecker().base_classes_of_node(child_without_bool) == [
+ assert ImplicitBooleanessChecker().base_classes_of_node(child_without_bool) == [
"ChildClassWithoutBool",
"ClassWithoutBool",
"dict",