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

Method test_shutdown_pending_get

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 9

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

Tested by

no test coverage detected