Skip to content

Commit 2ea3e69

Browse files
committed
[GR-44850] Try to collect garbage a few more times to test weakref proxies
1 parent 1b7e894 commit 2ea3e69

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

graalpython/lib-python/3/test/support/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ def requires_lzma(reason='requires lzma'):
466466
'requires legacy Unicode C API')
467467

468468
is_jython = sys.platform.startswith('java')
469+
is_graalpy = sys.implementation.name == "graalpy"
469470

470471
is_android = hasattr(sys, 'getandroidapilevel')
471472

@@ -661,9 +662,11 @@ def gc_collect():
661662
"""
662663
import gc
663664
gc.collect()
664-
if is_jython:
665+
if is_jython or is_graalpy:
665666
time.sleep(0.1)
666667
gc.collect()
668+
if is_graalpy:
669+
time.sleep(0.1)
667670
gc.collect()
668671

669672
@contextlib.contextmanager

0 commit comments

Comments
 (0)