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