(self)
| 164 | self.assertEqual(gc.collect(), 0) |
| 165 | |
| 166 | def test_method(self): |
| 167 | # Tricky: self.__init__ is a bound method, it references the instance. |
| 168 | class A: |
| 169 | def __init__(self): |
| 170 | self.init = self.__init__ |
| 171 | a = A() |
| 172 | gc.collect() |
| 173 | del a |
| 174 | self.assertNotEqual(gc.collect(), 0) |
| 175 | |
| 176 | @cpython_only |
| 177 | def test_legacy_finalizer(self): |
nothing calls this directly
no test coverage detected