(self)
| 1627 | # Ensure that setting *threshold0* to zero disables collection. |
| 1628 | @gc_threshold(0) |
| 1629 | def test_threshold_zero(self): |
| 1630 | junk = [] |
| 1631 | i = 0 |
| 1632 | detector = GC_Detector() |
| 1633 | while not detector.gc_happened: |
| 1634 | i += 1 |
| 1635 | if i > 50000: |
| 1636 | break |
| 1637 | junk.append([]) # this may eventually trigger gc (if it is enabled) |
| 1638 | |
| 1639 | self.assertEqual(i, 50001) |
| 1640 | |
| 1641 | |
| 1642 | class PythonFinalizationTests(unittest.TestCase): |
nothing calls this directly
no test coverage detected