aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib-python/2.7/test/test_multiprocessing.py9
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