]> granicus.if.org Git - python/commitdiff
Be more lenient in test_wallclock (issue #10278).
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 18 Jan 2012 21:35:21 +0000 (22:35 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 18 Jan 2012 21:35:21 +0000 (22:35 +0100)
Lib/test/test_time.py

index ede85b74b481d48bbdb5ac72e02408ce0ba6811b..1597ac1ace52157dd544f66c16c1d8f3e9ab60ea 100644 (file)
@@ -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):