summaryrefslogtreecommitdiffstats
path: root/Lib/test/lock_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/lock_tests.py')
-rw-r--r--Lib/test/lock_tests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/lock_tests.py b/Lib/test/lock_tests.py
index d69bcc9..dffb7d4 100644
--- a/Lib/test/lock_tests.py
+++ b/Lib/test/lock_tests.py
@@ -3,6 +3,7 @@ Various tests for synchronization primitives.
"""
import os
+import gc
import sys
import time
from _thread import start_new_thread, TIMEOUT_MAX
@@ -221,6 +222,7 @@ class BaseLockTests(BaseTestCase):
lock = self.locktype()
ref = weakref.ref(lock)
del lock
+ gc.collect() # For PyPy or other GCs.
self.assertIsNone(ref())