Commit 391166fb authored by Antoine Pitrou's avatar Antoine Pitrou

Be more lenient in test_wallclock (issue #10278).

parent f0ecdd2a
...@@ -331,13 +331,13 @@ class TimeTestCase(unittest.TestCase): ...@@ -331,13 +331,13 @@ class TimeTestCase(unittest.TestCase):
pass pass
self.assertEqual(time.strftime('%Z', tt), tzname) self.assertEqual(time.strftime('%Z', tt), tzname)
def test_wallclock(self): def test_wallclock(self):
t0 = time.wallclock() t0 = time.wallclock()
time.sleep(0.1) time.sleep(0.1)
t1 = time.wallclock() t1 = time.wallclock()
t = t1 - t0 t = t1 - t0
self.assertAlmostEqual(t, 0.1, places=2) self.assertAlmostEqual(t, 0.1, delta=0.2)
class TestLocale(unittest.TestCase): class TestLocale(unittest.TestCase):
def setUp(self): def setUp(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment