diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-02-03 05:37:26 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-02-03 05:37:26 (GMT) |
commit | dde5b94875460e704099593766f4a5bc3279483d (patch) | |
tree | d0c369148bd2d2f723896839aada008ef931ff19 /Lib/test/test_queue.py | |
parent | 17ae2ba78f96d661bdd1d8e2e8f96016c4aa4a60 (diff) | |
download | cpython-dde5b94875460e704099593766f4a5bc3279483d.zip cpython-dde5b94875460e704099593766f4a5bc3279483d.tar.gz cpython-dde5b94875460e704099593766f4a5bc3279483d.tar.bz2 |
#7092: Silence more py3k warnings. Patch by Florent Xicluna.
Diffstat (limited to 'Lib/test/test_queue.py')
-rw-r--r-- | Lib/test/test_queue.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/test/test_queue.py b/Lib/test/test_queue.py index 2fa36b7..715466f 100644 --- a/Lib/test/test_queue.py +++ b/Lib/test/test_queue.py @@ -102,21 +102,23 @@ class BaseQueueTest(unittest.TestCase, BlockingTestMixin): 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() |