From: Zachary Ware Date: Thu, 2 Jan 2014 15:41:10 +0000 (-0600) Subject: Issue #20101: Allow test_monotonic to pass on Windows machines on which X-Git-Tag: v3.4.0b2~48^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=487aedb77c9ef9a7cb5e42ae8b2141f310c5d8ef;p=thirdparty%2FPython%2Fcpython.git Issue #20101: Allow test_monotonic to pass on Windows machines on which time.get_clock_info('monotonic').resolution == 0.015600099999999999 This is just a workaround pending a real resolution to #20101. --- diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index 6b7a4fb7686e..ae3113a04afb 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -376,7 +376,8 @@ class TimeTestCase(unittest.TestCase): t2 = time.monotonic() dt = t2 - t1 self.assertGreater(t2, t1) - self.assertTrue(0.5 <= dt <= 1.0, dt) + # Issue #20101: On some Windows machines, dt may be slightly low + self.assertTrue(0.45 <= dt <= 1.0, dt) info = time.get_clock_info('monotonic') self.assertTrue(info.monotonic)