From fcc53090d01f6dc1544254bada04131789447d49 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Wed, 7 May 2025 09:39:51 +0100 Subject: [PATCH] Increase the heap size limit to 27_500 in test_incremental_gc_handles_fast_cycle_creation --- Lib/test/test_gc.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Lib/test/test_gc.py b/Lib/test/test_gc.py index 8fae12c478cb3a..0aef19735d2c0e 100644 --- a/Lib/test/test_gc.py +++ b/Lib/test/test_gc.py @@ -1161,14 +1161,6 @@ def make_ll(depth): return head head = make_ll(1000) - count = 1000 - - # There will be some objects we aren't counting, - # e.g. the gc stats dicts. This test checks - # that the counts don't grow, so we try to - # correct for the uncounted objects - # This is just an estimate. - CORRECTION = 20 enabled = gc.isenabled() gc.enable() @@ -1176,12 +1168,11 @@ def make_ll(depth): initial_heap_size = _testinternalcapi.get_tracked_heap_size() for i in range(20_000): newhead = make_ll(20) - count += 20 newhead.surprise = head olds.append(newhead) if len(olds) == 20: new_objects = _testinternalcapi.get_tracked_heap_size() - initial_heap_size - self.assertLess(new_objects, 27_000, f"Heap growing. Reached limit after {i} iterations") + self.assertLess(new_objects, 27_500, f"Heap growing. Reached limit after {i} iterations") del olds[:] if not enabled: gc.disable()