diff options
author | Stefano Rivera <stefano@rivera.za.net> | 2020-10-09 11:22:08 -0700 |
---|---|---|
committer | Stefano Rivera <stefano@rivera.za.net> | 2020-10-09 11:22:08 -0700 |
commit | 3ce27f2dce100945af919bb73e49a3b9ca863254 (patch) | |
tree | 9366e035b09841f21339c593f605f07fce336b7d /lib-python | |
parent | fix test (diff) | |
download | pypy-3ce27f2dce100945af919bb73e49a3b9ca863254.tar.gz pypy-3ce27f2dce100945af919bb73e49a3b9ca863254.tar.bz2 pypy-3ce27f2dce100945af919bb73e49a3b9ca863254.zip |
test_multiprocessing: pypy's GC doesn't have {get,set}_threshold
Diffstat (limited to 'lib-python')
-rw-r--r-- | lib-python/2.7/test/test_multiprocessing.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib-python/2.7/test/test_multiprocessing.py b/lib-python/2.7/test/test_multiprocessing.py index 4f8d8f410c..ebb0780ed8 100644 --- a/lib-python/2.7/test/test_multiprocessing.py +++ b/lib-python/2.7/test/test_multiprocessing.py @@ -2241,10 +2241,12 @@ class _TestFinalize(BaseTestCase): d.clear() old_interval = sys.getcheckinterval() - old_threshold = gc.get_threshold() + if support.check_impl_detail(cpython=True): + old_threshold = gc.get_threshold() try: sys.setcheckinterval(10) - gc.set_threshold(5, 5, 5) + if support.check_impl_detail(cpython=True): + gc.set_threshold(5, 5, 5) threads = [threading.Thread(target=run_finalizers), threading.Thread(target=make_finalizers)] with support.start_threads(threads): @@ -2254,7 +2256,8 @@ class _TestFinalize(BaseTestCase): raise exc[0] finally: sys.setcheckinterval(old_interval) - gc.set_threshold(*old_threshold) + if support.check_impl_detail(cpython=True): + gc.set_threshold(*old_threshold) gc.collect() # Collect remaining Foo's |