MCPcopy Index your code
hub / github.com/python/cpython / test_nowait

Method test_nowait

Lib/test/test_queue.py:221–231  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

219 q.get(1, timeout=-1)
220
221 def test_nowait(self):
222 q = self.type2test(QUEUE_SIZE)
223 for i in range(QUEUE_SIZE):
224 q.put_nowait(1)
225 with self.assertRaises(self.queue.Full):
226 q.put_nowait(1)
227
228 for i in range(QUEUE_SIZE):
229 q.get_nowait()
230 with self.assertRaises(self.queue.Empty):
231 q.get_nowait()
232
233 def test_shrinking_queue(self):
234 # issue 10110

Callers

nothing calls this directly

Calls 4

type2testMethod · 0.80
put_nowaitMethod · 0.45
assertRaisesMethod · 0.45
get_nowaitMethod · 0.45

Tested by

no test coverage detected