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

Skip to content

Commit 1700788

Browse files
committed
Close #19999: tolerate coarse time when testing time.monotonic() on very
busy/slow buildbot
1 parent de57074 commit 1700788

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/test/test_time.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def test_monotonic(self):
376376
t2 = time.monotonic()
377377
dt = t2 - t1
378378
self.assertGreater(t2, t1)
379-
self.assertAlmostEqual(dt, 0.5, delta=0.2)
379+
self.assertTrue(0.5 <= dt <= 1.0, dt)
380380

381381
info = time.get_clock_info('monotonic')
382382
self.assertTrue(info.monotonic)

0 commit comments

Comments
 (0)