[pypy-commit] pypy py3.5: fix tests

rlamy pypy.commits at gmail.com
Mon Feb 19 22:10:55 EST 2018


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.5
Changeset: r93840:a5f69bc67c34
Date: 2018-02-20 03:10 +0000
http://bitbucket.org/pypy/pypy/changeset/a5f69bc67c34/

Log:	fix tests

diff --git a/pypy/module/thread/test/test_local.py b/pypy/module/thread/test/test_local.py
--- a/pypy/module/thread/test/test_local.py
+++ b/pypy/module/thread/test/test_local.py
@@ -102,8 +102,8 @@
         assert len(done) == 5
 
     def test_weakrefable(self):
-        import thread, weakref
-        weakref.ref(thread._local())
+        import _thread, weakref
+        weakref.ref(_thread._local())
 
     def test_local_is_not_immortal(self):
         import _thread, gc, time
diff --git a/pypy/module/thread/test/test_lock.py b/pypy/module/thread/test/test_lock.py
--- a/pypy/module/thread/test/test_lock.py
+++ b/pypy/module/thread/test/test_lock.py
@@ -53,8 +53,8 @@
         assert lock.locked() is False
 
     def test_weakrefable(self):
-        import thread, weakref
-        weakref.ref(thread.allocate_lock())
+        import _thread, weakref
+        weakref.ref(_thread.allocate_lock())
 
     def test_timeout(self):
         import _thread


More information about the pypy-commit mailing list