Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_queue.py @ 58669:ff040880d1be legacy-trunk
#7092: Silence more py3k warnings. Patch by Florent Xicluna.
| author | Ezio Melotti <ezio.melotti@gmail.com> |
|---|---|
| date | Wed, 03 Feb 2010 05:37:26 +0000 |
| parents | 0dd1aa33265f |
| children | 70e115c34f97 |
line wrap: on
line diff
--- a/Lib/test/test_queue.py Wed Feb 03 02:19:14 2010 +0000 +++ b/Lib/test/test_queue.py Wed Feb 03 05:37:26 2010 +0000 @@ -102,21 +102,23 @@ q.put(i) self.assertTrue(not q.empty(), "Queue should not be empty") self.assertTrue(not q.full(), "Queue should not be full") - q.put("last") + last = 2 * QUEUE_SIZE + full = 3 * 2 * QUEUE_SIZE + q.put(last) self.assertTrue(q.full(), "Queue should be full") try: - q.put("full", block=0) + q.put(full, block=0) self.fail("Didn't appear to block with a full queue") except Queue.Full: pass try: - q.put("full", timeout=0.01) + q.put(full, timeout=0.01) self.fail("Didn't appear to time-out with a full queue") except Queue.Full: pass # Test a blocking put - self.do_blocking_test(q.put, ("full",), q.get, ()) - self.do_blocking_test(q.put, ("full", True, 10), q.get, ()) + self.do_blocking_test(q.put, (full,), q.get, ()) + self.do_blocking_test(q.put, (full, True, 10), q.get, ()) # Empty it for i in range(QUEUE_SIZE): q.get()
