We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc1824b commit 8af29dbCopy full SHA for 8af29db
Lib/test/test_time.py
@@ -164,7 +164,12 @@ def test_sleep_until(self):
164
deadline = start + 2
165
time.sleep_until(deadline)
166
stop = time.time()
167
- self.assertLess(abs(stop - deadline), 0.050)
+ delta = stop - deadline
168
+ # cargo-cult these 50ms from test_monotonic (bpo-20101)
169
+ self.assertGreater(delta, -0.050)
170
+ # allow sleep_until to take up to 1s longer than planned
171
+ # (e.g. in case the system is under heavy load during testing)
172
+ self.assertLess(delta, 1.000)
173
174
def test_epoch(self):
175
# bpo-43869: Make sure that Python use the same Epoch on all platforms:
0 commit comments