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):
4848 messages = self ._run_pylint (code )
4949 errors = [msg for msg in messages if msg .msg_id == "E0611" ]
5050 self .assertEqual (len (errors ), 0 )
51-
52- def test_shadowed_other_method (self ):
51+
52+ def test_early_module_yield (self ):
5353 code = "import my_module.utils as my_module\n my_module.other_method()\n "
5454 messages = self ._run_pylint (code )
5555 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 } " )
5763
5864 def test_non_shadowed_import (self ):
5965 code = "import my_module.utils as utils\n utils.format()\n "
You can’t perform that action at this time.
0 commit comments