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

Method test_new_attr

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

Source from the content-addressed store, hash-verified

102 self.assertEqual(TestingImporter.mutated_name, module.__name__)
103
104 def test_new_attr(self):
105 # A new attribute should persist.
106 module = self.new_module()
107 module.new_attr = 42
108 self.assertEqual(42, module.new_attr)
109
110 def test_mutated_preexisting_attr(self):
111 # Changing an attribute that already existed on the module --

Callers

nothing calls this directly

Calls 2

new_moduleMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected