[pypy-commit] pypy py3.6: Add GC collect to lock_tests weakref delete test.
David C Ellis
pypy.commits at gmail.com
Wed Sep 19 10:26:26 EDT 2018
Author: David C Ellis <ducksual at gmail.com>
Branch: py3.6
Changeset: r95141:5f0d3bf975f8
Date: 2018-09-19 12:18 +0100
http://bitbucket.org/pypy/pypy/changeset/5f0d3bf975f8/
Log: Add GC collect to lock_tests weakref delete test.
diff --git a/lib-python/3/test/lock_tests.py b/lib-python/3/test/lock_tests.py
--- a/lib-python/3/test/lock_tests.py
+++ b/lib-python/3/test/lock_tests.py
@@ -2,6 +2,7 @@
Various tests for synchronization primitives.
"""
+import gc
import sys
import time
from _thread import start_new_thread, TIMEOUT_MAX
@@ -208,6 +209,7 @@
lock = self.locktype()
ref = weakref.ref(lock)
del lock
+ gc.collect()
self.assertIsNone(ref())
More information about the pypy-commit
mailing list