(self)
| 988 | gc.collect() |
| 989 | |
| 990 | def test_callback_attribute(self): |
| 991 | x = Object(1) |
| 992 | callback = lambda ref: None |
| 993 | ref1 = weakref.ref(x, callback) |
| 994 | self.assertIs(ref1.__callback__, callback) |
| 995 | |
| 996 | ref2 = weakref.ref(x) |
| 997 | self.assertIsNone(ref2.__callback__) |
| 998 | |
| 999 | def test_callback_attribute_after_deletion(self): |
| 1000 | x = Object(1) |
nothing calls this directly
no test coverage detected