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

on Windows
This commit is contained in:
Victor Stinner 2015-02-05 14:25:05 +01:00
parent aef859c5ee
commit aad7b2e4f5
1 changed files with 4 additions and 2 deletions

View File

@ -716,9 +716,11 @@ class _TestQueue(BaseTestCase):
def test_timeout(self):
q = multiprocessing.Queue()
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
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)
#
#