(self)
| 641 | self.assertTrue(gc.is_tracked(UserIntSlots())) |
| 642 | |
| 643 | def test_is_finalized(self): |
| 644 | # Objects not tracked by the always gc return false |
| 645 | self.assertFalse(gc.is_finalized(3)) |
| 646 | |
| 647 | storage = [] |
| 648 | class Lazarus: |
| 649 | def __del__(self): |
| 650 | storage.append(self) |
| 651 | |
| 652 | lazarus = Lazarus() |
| 653 | self.assertFalse(gc.is_finalized(lazarus)) |
| 654 | |
| 655 | del lazarus |
| 656 | gc.collect() |
| 657 | |
| 658 | lazarus = storage.pop() |
| 659 | self.assertTrue(gc.is_finalized(lazarus)) |
| 660 | |
| 661 | def test_bug1055820b(self): |
| 662 | # Corresponds to temp2b.py in the bug report. |
nothing calls this directly
no test coverage detected