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

Method test_shutdown_pending_get

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

Source from the content-addressed store, hash-verified

638 self.assertEqual(results, [True]*len(thrds))
639
640 def test_shutdown_pending_get(self):
641 def get():
642 try:
643 results.append(q.get())
644 except Exception as e:
645 results.append(e)
646
647 q = self.type2test()
648 results = []
649 get_thread = threading.Thread(target=get)
650 get_thread.start()
651 q.shutdown(immediate=False)
652 get_thread.join(timeout=10.0)
653 self.assertFalse(get_thread.is_alive())
654 self.assertEqual(len(results), 1)
655 self.assertIsInstance(results[0], self.queue.ShutDown)
656
657
658class QueueTest(BaseQueueTestMixin):

Callers

nothing calls this directly

Calls 8

startMethod · 0.95
joinMethod · 0.95
is_aliveMethod · 0.95
type2testMethod · 0.80
assertFalseMethod · 0.80
assertIsInstanceMethod · 0.80
shutdownMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected