Skip to content

Commit dad2399

Browse files
Fix flaky tests on 3.14 (#11584)
1 parent 011cd9e commit dad2399

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ def test_timeout_handle(loop: asyncio.AbstractEventLoop) -> None:
294294

295295
def test_when_timeout_smaller_second(loop: asyncio.AbstractEventLoop) -> None:
296296
timeout = 0.1
297-
timer = loop.time() + timeout
298297

299298
handle = helpers.TimeoutHandle(loop, timeout)
299+
timer = loop.time() + timeout
300300
start_handle = handle.start()
301301
assert start_handle is not None
302302
when = start_handle.when()
@@ -310,9 +310,9 @@ def test_when_timeout_smaller_second_with_low_threshold(
310310
loop: asyncio.AbstractEventLoop,
311311
) -> None:
312312
timeout = 0.1
313-
timer = loop.time() + timeout
314313

315314
handle = helpers.TimeoutHandle(loop, timeout, 0.01)
315+
timer = loop.time() + timeout
316316
start_handle = handle.start()
317317
assert start_handle is not None
318318
when = start_handle.when()

0 commit comments

Comments
 (0)