summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-02-05 13:25:05 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-02-05 13:25:05 (GMT)
commitaad7b2e4f5380d67a93cf088c05692d4513f4aa9 (patch)
treead2fd86a5411c7ee5ee4cccc2d44d48e8bc83753
parentaef859c5ee3506f8faad0055e7875af94c4d483f (diff)
downloadcpython-aad7b2e4f5380d67a93cf088c05692d4513f4aa9.zip
cpython-aad7b2e4f5380d67a93cf088c05692d4513f4aa9.tar.gz
cpython-aad7b2e4f5380d67a93cf088c05692d4513f4aa9.tar.bz2
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 44d6c71..2d4395e 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)
#
#