[pypy-commit] pypy py3.5: fix test_thread
arigo
pypy.commits at gmail.com
Sat Feb 18 11:42:52 EST 2017
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r90182:5eff971973e1
Date: 2017-02-18 17:42 +0100
http://bitbucket.org/pypy/pypy/changeset/5eff971973e1/
Log: fix test_thread
diff --git a/pypy/module/pypyjit/test_pypy_c/test_thread.py b/pypy/module/pypyjit/test_pypy_c/test_thread.py
--- a/pypy/module/pypyjit/test_pypy_c/test_thread.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_thread.py
@@ -4,7 +4,10 @@
class TestThread(BaseTestPyPyC):
def test_simple(self):
def main(n):
- import thread
+ try:
+ import _thread as thread
+ except ImportError:
+ import thread
def f():
i = 0
while i < n:
@@ -29,7 +32,10 @@
def test_tls(self):
def main(n):
- import thread
+ try:
+ import _thread as thread
+ except ImportError:
+ import thread
local = thread._local()
local.x = 1
i = 0
@@ -64,10 +70,13 @@
guard_true(i56, descr=...)
p57 = force_token()
setfield_gc(p0, p57, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token 8>)
- i58 = call_release_gil_i(0, _, i37, 1, descr=<Calli 4 ii EF=7>)
+ i58 = call_may_force_i(ConstClass(acquire_timed), p31, -1, descr=<Calli . ri EF=7>)
guard_not_forced(descr=...)
guard_no_exception(descr=...)
+ i99 = int_eq(i58, 1)
+ guard_true(i99, descr=...)
i58 = int_sub(i44, 1)
+ p98 = getfield_gc_r(p97, descr=.*inst_sys_exc_operror.*)
i59 = call_i(ConstClass(RPyThreadReleaseLock), i37, descr=<Calli . i EF=2>)
i60 = int_is_true(i59)
guard_false(i60, descr=...)
More information about the pypy-commit
mailing list