MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_dont_clear_dict

Method test_dont_clear_dict

Lib/test/test_module/__init__.py:96–103  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

94 self.assertTrue(foo.__dict__ is d)
95
96 def test_dont_clear_dict(self):
97 # See issue 7140.
98 def f():
99 foo = ModuleType("foo")
100 foo.bar = 4
101 return foo
102 gc_collect()
103 self.assertEqual(f().__dict__["bar"], 4)
104
105 # TODO: RUSTPYTHON
106 @unittest.expectedFailure

Callers

nothing calls this directly

Calls 3

gc_collectFunction · 0.90
fFunction · 0.50
assertEqualMethod · 0.45

Tested by

no test coverage detected