Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r57461:3c00d76f0147
Date: 2012-09-20 23:59 +0200
http://bitbucket.org/pypy/pypy/changeset/3c00d76f0147/
Log: cpyext: fix test_thread
diff --git a/pypy/module/cpyext/test/test_thread.py
b/pypy/module/cpyext/test/test_thread.py
--- a/pypy/module/cpyext/test/test_thread.py
+++ b/pypy/module/cpyext/test/test_thread.py
@@ -12,11 +12,11 @@
return PyInt_FromLong(PyPyThread_get_thread_ident());
"""),
])
- import thread, threading
+ import threading
results = []
def some_thread():
res = module.get_thread_ident()
- results.append((res, thread.get_ident()))
+ results.append((res, threading._get_ident()))
some_thread()
assert results[0][0] == results[0][1]
@@ -108,7 +108,7 @@
result.append(e)
else:
result.append(True)
- _thread.start_new_thread(in_thread, ())
+ _thread.start_new_thread(in_thread, ())
while not result:
print(".")
time.sleep(.5)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit