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

Method test_timeout

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

Source from the content-addressed store, hash-verified

1272 " see Issue #22853")
1273
1274 def test_timeout(self):
1275 q = multiprocessing.Queue()
1276 start = time.monotonic()
1277 self.assertRaises(pyqueue.Empty, q.get, True, 0.200)
1278 delta = time.monotonic() - start
1279 # bpo-30317: Tolerate a delta of 100 ms because of the bad clock
1280 # resolution on Windows (usually 15.6 ms). x86 Windows7 3.x once
1281 # failed because the delta was only 135.8 ms.
1282 self.assertGreaterEqual(delta, 0.100)
1283 close_queue(q)
1284
1285 def test_queue_feeder_donot_stop_onexc(self):
1286 # 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