(self)
| 418 | |
| 419 | @refcount_test |
| 420 | def test_collect_generations(self): |
| 421 | gc.collect() |
| 422 | # This object will "trickle" into generation N + 1 after |
| 423 | # each call to collect(N) |
| 424 | x = [] |
| 425 | gc.collect(0) |
| 426 | # x is now in the old gen |
| 427 | a, b, c = gc.get_count() |
| 428 | # We don't check a since its exact values depends on |
| 429 | # internal implementation details of the interpreter. |
| 430 | self.assertEqual((b, c), (1, 0)) |
| 431 | |
| 432 | def test_trashcan(self): |
| 433 | class Ouch: |
nothing calls this directly
no test coverage detected