mirror of
https://github.com/python/cpython.git
synced 2025-08-24 02:35:59 +00:00
Merged revisions 77942,79023 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77942 | ezio.melotti | 2010-02-03 07:37:26 +0200 (Wed, 03 Feb 2010) | 1 line #7092: Silence more py3k warnings. Patch by Florent Xicluna. ........ r79023 | ezio.melotti | 2010-03-17 15:52:48 +0200 (Wed, 17 Mar 2010) | 1 line #7092: silence some more py3k warnings. ........
This commit is contained in:
parent
5ff2745fed
commit
3efafd7749
41 changed files with 143 additions and 108 deletions
|
@ -102,21 +102,23 @@ class BaseQueueTest(unittest.TestCase, BlockingTestMixin):
|
|||
q.put(i)
|
||||
self.assert_(not q.empty(), "Queue should not be empty")
|
||||
self.assert_(not q.full(), "Queue should not be full")
|
||||
q.put("last")
|
||||
last = 2 * QUEUE_SIZE
|
||||
full = 3 * 2 * QUEUE_SIZE
|
||||
q.put(last)
|
||||
self.assert_(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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue