Skip to content

Commit e146f6a

Browse files
committed
resolve comments
1 parent 4d8c884 commit e146f6a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Lib/test/test_importlib/test_lazy.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff 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\nnew_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'))

0 commit comments

Comments
 (0)