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

Method test_timeout

Lib/test/_test_multiprocessing.py:1426–1435  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1424
1425 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
1426 def test_timeout(self):
1427 q = multiprocessing.Queue()
1428 start = time.monotonic()
1429 self.assertRaises(pyqueue.Empty, q.get, True, 0.200)
1430 delta = time.monotonic() - start
1431 # bpo-30317: Tolerate a delta of 100 ms because of the bad clock
1432 # resolution on Windows (usually 15.6 ms). x86 Windows7 3.x once
1433 # failed because the delta was only 135.8 ms.
1434 self.assertGreaterEqual(delta, 0.100)
1435 close_queue(q)
1436
1437 def test_queue_feeder_donot_stop_onexc(self):
1438 # bpo-30414: verify feeder handles exceptions correctly

Callers

nothing calls this directly

Calls 4

close_queueFunction · 0.85
QueueMethod · 0.80
assertGreaterEqualMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected