File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,18 @@ def test_shadowed_format_call(self):
48
48
messages = self ._run_pylint (code )
49
49
errors = [msg for msg in messages if msg .msg_id == "E0611" ]
50
50
self .assertEqual (len (errors ), 0 )
51
-
52
- def test_shadowed_other_method (self ):
51
+
52
+ def test_early_module_yield (self ):
53
53
code = "import my_module.utils as my_module\n my_module.other_method()\n "
54
54
messages = self ._run_pylint (code )
55
55
errors = [msg for msg in messages if msg .msg_id == "E0611" ]
56
- self .assertEqual (len (errors ), 0 )
56
+ self .assertEqual (len (errors ), 0 , f"Unexpected error: { errors } " )
57
+
58
+ def test_access_module_dict (self ):
59
+ code = "import my_module.utils as utils\n print(utils.__dict__)\n "
60
+ messages = self ._run_pylint (code )
61
+ errors = [msg for msg in messages if msg .msg_id == "E0611" ]
62
+ self .assertEqual (len (errors ), 0 , f"Should allow __dict__ access: { errors } " )
57
63
58
64
def test_non_shadowed_import (self ):
59
65
code = "import my_module.utils as utils\n utils.format()\n "
You can’t perform that action at this time.
0 commit comments