Charles-François Natali <neolo...@free.fr> added the comment:

Here's a one-liner patch using the later approach  (that way we're
sure the test won't hang).

----------
keywords: +patch
Added file: http://bugs.python.org/file22015/wait_for_race.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12096>
_______________________________________
diff -r 85aa02bc674c Lib/test/lock_tests.py
--- a/Lib/test/lock_tests.py    Tue May 17 14:52:21 2011 +0200
+++ b/Lib/test/lock_tests.py    Tue May 17 19:21:59 2011 +0200
@@ -474,7 +474,7 @@
                 self.assertEqual(state, 4)
         b = Bunch(f, 1)
         b.wait_for_started()
-        for i in range(5):
+        for i in range(4):
             time.sleep(0.01)
             with cond:
                 state += 1
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to