summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-07-03 23:07:59 +0200
committerVictor Stinner <victor.stinner@gmail.com>2013-07-03 23:07:59 +0200
commitad03f87bffde493760bb2f2be953ade16cd2a23b (patch)
treeab802092f6c9e4b2af556cf29dc433ca31099d9f
parent600f7fccf3becf6184779c582a7c1a40f6c843b7 (diff)
parent96dc729374f31d1870cd2f9dd85e91fbea54d73e (diff)
downloadcpython-ad03f87bffde493760bb2f2be953ade16cd2a23b.tar.gz
(Merge 3.3) test_time.test_monotonic(): use a longer sleep to try to make the test more reliable
-rw-r--r--Lib/test/test_time.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
index 18e056826a..faf9779a47 100644
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -368,11 +368,11 @@ class TimeTestCase(unittest.TestCase):
'need time.monotonic')
def test_monotonic(self):
t1 = time.monotonic()
- time.sleep(0.1)
+ time.sleep(0.5)
t2 = time.monotonic()
dt = t2 - t1
self.assertGreater(t2, t1)
- self.assertAlmostEqual(dt, 0.1, delta=0.2)
+ self.assertAlmostEqual(dt, 0.5, delta=0.2)
info = time.get_clock_info('monotonic')
self.assertTrue(info.monotonic)