File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -231,19 +231,17 @@ def test_reload(self):
231231 # Reloading a lazy module that hasn't been materialized is a no-op.
232232 module = self .new_module ()
233233 sys .modules [TestingImporter .module_name ] = module
234- self .assertIsInstance (module , util ._LazyModule )
235234
236- # Change the source code to add a new attribute
235+ # Change the source code to add a new attribute.
237236 TestingImporter .source_code = 'attr = 42\n new_attr = 123\n __name__ = {!r}' .format (TestingImporter .mutated_name )
238237 self .assertIsInstance (module , util ._LazyModule )
239238
240- # Reload the module (should be a no-op since not materialized)
239+ # Reload the module (should be a no-op since not materialized).
241240 reloaded = importlib .reload (module )
242241 self .assertIs (reloaded , module )
243242 self .assertIsInstance (module , util ._LazyModule )
244243
245-
246- # Access the new attribute (should trigger materialization, and new_attr should exist)
244+ # Access the new attribute (should trigger materialization, and new_attr should exist).
247245 self .assertEqual (module .attr , 42 )
248246 self .assertNotIsInstance (module , util ._LazyModule )
249247 self .assertTrue (hasattr (module , 'new_attr' ))
You can’t perform that action at this time.
0 commit comments