diff --git a/Lib/test/test_queue.py b/Lib/test/test_queue.py index 06e32ecd252..8c961941f47 100644 --- a/Lib/test/test_queue.py +++ b/Lib/test/test_queue.py @@ -144,7 +144,7 @@ def simple_queue_test(self, q): def worker(self, q): while True: x = q.get() - if x is None: + if x < 0: q.task_done() return with self.cumlock: @@ -160,7 +160,8 @@ def queue_join_test(self, q): q.join() self.assertEquals(self.cum, sum(range(100)), "q.join() did not block until all tasks were done") - q.put(None) # instruct the threads to close + for i in (0,1): + q.put(-1) # instruct the threads to close q.join() # verify that you can join twice def test_queue_task_done(self):