summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-02-05 13:25:53 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-02-05 13:25:53 (GMT)
commitf92766c3b27d4c1fef95809412f2989aebf0b545 (patch)
tree364f14e7ce4b7c2c39193bca61e587d58fd47fc3
parent71f5b71cfba48a6f44369e3ee3325bec342da207 (diff)
parentaad7b2e4f5380d67a93cf088c05692d4513f4aa9 (diff)
downloadcpython-f92766c3b27d4c1fef95809412f2989aebf0b545.zip
cpython-f92766c3b27d4c1fef95809412f2989aebf0b545.tar.gz
cpython-f92766c3b27d4c1fef95809412f2989aebf0b545.tar.bz2
(Merge 3.4) 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 78208c3..52598b3 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)
#
#