MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_shrinking_queue

Method test_shrinking_queue

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

Source from the content-addressed store, hash-verified

229 q.get_nowait()
230
231 def test_shrinking_queue(self):
232 # issue 10110
233 q = self.type2test(3)
234 q.put(1)
235 q.put(2)
236 q.put(3)
237 with self.assertRaises(self.queue.Full):
238 q.put_nowait(4)
239 self.assertEqual(q.qsize(), 3)
240 q.maxsize = 2 # shrink the queue
241 with self.assertRaises(self.queue.Full):
242 q.put_nowait(4)
243
244 def test_shutdown_empty(self):
245 q = self.type2test()

Callers

nothing calls this directly

Calls 6

type2testMethod · 0.80
putMethod · 0.45
assertRaisesMethod · 0.45
put_nowaitMethod · 0.45
assertEqualMethod · 0.45
qsizeMethod · 0.45

Tested by

no test coverage detected