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

Method test_order

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

Source from the content-addressed store, hash-verified

957 q.get(timeout=-1)
958
959 def test_order(self):
960 # Test a pair of concurrent put() and get()
961 q = self.q
962 inputs = list(range(100))
963 results = self.run_threads(1, q, inputs, self.feed, self.consume)
964
965 # One producer, one consumer => results appended in well-defined order
966 self.assertEqual(results, inputs)
967
968 @bigmemtest(size=50, memuse=100*2**20, dry_run=False)
969 def test_many_threads(self, size):

Callers

nothing calls this directly

Calls 3

run_threadsMethod · 0.95
listClass · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected