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

Skip to content

Commit 1a048f9

Browse files
committed
test_selectors: test_timeout fails sometimes on busy (slow) buildbots, relax
the unit test on max time (but be more strict on mon time). Example of failure: http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.x/builds/6978/steps/test/logs/stdio ====================================================================== FAIL: test_timeout (test.test_selectors.PollSelectorTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_selectors.py", line 316, in test_timeout self.assertTrue(0.5 < t1 - t0 < 1.5, t1 - t0) AssertionError: False is not true : 1.5033390671014786
1 parent 55329f8 commit 1a048f9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/test/test_selectors.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,8 @@ def test_timeout(self):
313313
t0 = time()
314314
self.assertFalse(s.select(1))
315315
t1 = time()
316-
self.assertTrue(0.5 < t1 - t0 < 1.5, t1 - t0)
316+
dt = t1 - t0
317+
self.assertTrue(0.8 <= dt <= 1.6, dt)
317318

318319
@unittest.skipUnless(hasattr(signal, "alarm"),
319320
"signal.alarm() required for this test")

0 commit comments

Comments
 (0)