(self)
| 95 | self.assertTrue(foo.__dict__ is d) |
| 96 | |
| 97 | def test_dont_clear_dict(self): |
| 98 | # See issue 7140. |
| 99 | def f(): |
| 100 | foo = ModuleType("foo") |
| 101 | foo.bar = 4 |
| 102 | return foo |
| 103 | gc_collect() |
| 104 | self.assertEqual(f().__dict__["bar"], 4) |
| 105 | |
| 106 | def test_clear_dict_in_ref_cycle(self): |
| 107 | destroyed = [] |
nothing calls this directly
no test coverage detected