MCPcopy Index your code
hub / github.com/python/cpython / test_attr_unchanged

Method test_attr_unchanged

Lib/test/test_importlib/test_lazy.py:98–102  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

96 self.assertEqual(module, importer.loaded)
97
98 def test_attr_unchanged(self):
99 # An attribute only mutated as a side-effect of import should not be
100 # changed needlessly.
101 module = self.new_module()
102 self.assertEqual(TestingImporter.mutated_name, module.__name__)
103
104 def test_new_attr(self):
105 # A new attribute should persist.

Callers

nothing calls this directly

Calls 2

new_moduleMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected