@@ -781,9 +781,7 @@ def test_function_base_props(self) -> None:
781
781
def test_function_locals (self ) -> None :
782
782
"""Test the 'locals' dictionary of an astroid function."""
783
783
_locals = self .module ["global_access" ].locals
784
- self .assertEqual (len (_locals ), 4 )
785
- keys = sorted (_locals .keys ())
786
- self .assertEqual (keys , ["i" , "key" , "local" , "val" ])
784
+ self .assertEqual (sorted (_locals .keys ()), ["i" , "key" , "local" , "val" ])
787
785
788
786
def test_class_base_props (self ) -> None :
789
787
"""Test base properties and method of an astroid class."""
@@ -861,11 +859,8 @@ def test_method_base_props(self) -> None:
861
859
def test_method_locals (self ) -> None :
862
860
"""Test the 'locals' dictionary of an astroid method."""
863
861
method = self .module ["YOUPI" ]["method" ]
864
- _locals = method .locals
865
- keys = sorted (_locals )
866
862
# ListComp variables are not accessible outside
867
- self .assertEqual (len (_locals ), 3 )
868
- self .assertEqual (keys , ["autre" , "local" , "self" ])
863
+ self .assertEqual (sorted (method .locals ), ["autre" , "local" , "self" ])
869
864
870
865
def test_unknown_encoding (self ) -> None :
871
866
with self .assertRaises (AstroidSyntaxError ):
0 commit comments