Skip to content

Commit 7121896

Browse files
Better tests, less checks, easier to see what's wrong
1 parent 943a0e6 commit 7121896

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tests/test_builder.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -861,11 +861,8 @@ def test_method_base_props(self) -> None:
861861
def test_method_locals(self) -> None:
862862
"""Test the 'locals' dictionary of an astroid method."""
863863
method = self.module["YOUPI"]["method"]
864-
_locals = method.locals
865-
keys = sorted(_locals)
866864
# ListComp variables are not accessible outside
867-
self.assertEqual(len(_locals), 3)
868-
self.assertEqual(keys, ["autre", "local", "self"])
865+
self.assertEqual(sorted(method.locals), ["autre", "local", "self"])
869866

870867
def test_unknown_encoding(self) -> None:
871868
with self.assertRaises(AstroidSyntaxError):

0 commit comments

Comments
 (0)