From: Antoine Pitrou Date: Wed, 18 Jan 2012 21:35:21 +0000 (+0100) Subject: Be more lenient in test_wallclock (issue #10278). X-Git-Tag: v3.3.0a1~346 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=391166fbfcdecc5c428db3d67242d1f1beb2b423;p=python Be more lenient in test_wallclock (issue #10278). --- diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index ede85b74b4..1597ac1ace 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -331,13 +331,13 @@ class TimeTestCase(unittest.TestCase): pass self.assertEqual(time.strftime('%Z', tt), tzname) - def test_wallclock(self): t0 = time.wallclock() time.sleep(0.1) t1 = time.wallclock() t = t1 - t0 - self.assertAlmostEqual(t, 0.1, places=2) + self.assertAlmostEqual(t, 0.1, delta=0.2) + class TestLocale(unittest.TestCase): def setUp(self):