[pypy-svn] r72346 - pypy/branch/kill-python-h/pypy/module/thread/test
arigo at codespeak.net
arigo at codespeak.net
Thu Mar 18 04:53:02 CET 2010
Author: arigo
Date: Thu Mar 18 04:53:01 2010
New Revision: 72346
Modified:
pypy/branch/kill-python-h/pypy/module/thread/test/test_import_lock.py
Log:
Fix a test partially. Add an XXX about the part that I did not fix.
Modified: pypy/branch/kill-python-h/pypy/module/thread/test/test_import_lock.py
==============================================================================
--- pypy/branch/kill-python-h/pypy/module/thread/test/test_import_lock.py (original)
+++ pypy/branch/kill-python-h/pypy/module/thread/test/test_import_lock.py Thu Mar 18 04:53:01 2010
@@ -10,17 +10,19 @@
cls.w_tmpdir = cls.space.wrap(tmpdir)
def test_import_lock(self):
+ # XXX XXX XXX this test fails if run together with all other tests
+ # of this directory, but not when run alone
import thread, imp
assert not imp.lock_held()
done = []
- def f():
+ def f(i):
print '[ENTER %d]' % i
from imghdr import testall
print '[LEAVE %d]' % i
done.append(1)
for i in range(5):
print '[RUN %d]' % i
- thread.start_new_thread(f, ())
+ thread.start_new_thread(f, (i,))
self.waitfor(lambda: len(done) == 5)
assert len(done) == 5
More information about the Pypy-commit
mailing list