summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-02-05 14:25:05 +0100
committerVictor Stinner <victor.stinner@gmail.com>2015-02-05 14:25:05 +0100
commit9462e831517f496437e5c8095802e960d62b68e8 (patch)
treef035575ac661e0facf25d676eb58ec13413ea817
parenta1585af21d5879e2804dd9ad562855d010441aab (diff)
downloadcpython-9462e831517f496437e5c8095802e960d62b68e8.tar.gz
test_multiprocessing: tolerate a delta of 30 ms because of bad clock resolution
on Windows
-rw-r--r--Lib/test/_test_multiprocessing.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index 44d6c71e40..2d4395e7cd 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -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)
#
#