Commit aad7b2e4 authored by Victor Stinner's avatar Victor Stinner

test_multiprocessing: tolerate a delta of 30 ms because of bad clock resolution

on Windows
parent aef859c5
...@@ -716,9 +716,11 @@ class _TestQueue(BaseTestCase): ...@@ -716,9 +716,11 @@ class _TestQueue(BaseTestCase):
def test_timeout(self): def test_timeout(self):
q = multiprocessing.Queue() q = multiprocessing.Queue()
start = time.time() start = time.time()
self.assertRaises(pyqueue.Empty, q.get, True, 0.2) self.assertRaises(pyqueue.Empty, q.get, True, 0.200)
delta = time.time() - start delta = time.time() - start
self.assertGreaterEqual(delta, 0.18) # Tolerate a delta of 30 ms because of the bad clock resolution on
# Windows (usually 15.6 ms)
self.assertGreaterEqual(delta, 0.170)
# #
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment