Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 391166f

Browse files
committed
Be more lenient in test_wallclock (issue #10278).
1 parent f0ecdd2 commit 391166f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_time.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,13 +331,13 @@ def test_mktime_error(self):
331331
pass
332332
self.assertEqual(time.strftime('%Z', tt), tzname)
333333

334-
335334
def test_wallclock(self):
336335
t0 = time.wallclock()
337336
time.sleep(0.1)
338337
t1 = time.wallclock()
339338
t = t1 - t0
340-
self.assertAlmostEqual(t, 0.1, places=2)
339+
self.assertAlmostEqual(t, 0.1, delta=0.2)
340+
341341

342342
class TestLocale(unittest.TestCase):
343343
def setUp(self):

0 commit comments

Comments
 (0)