Skip to content

Commit 8841d15

Browse files
committed
fix test_clock_advance_time for changes to ClockEventLoop interface
1 parent 7d94f14 commit 8841d15

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/test_simple_35.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,12 @@ def test_async_close_loop(event_loop):
8888
return 'ok'
8989

9090

91-
def test_clock_loop(clock_event_loop):
92-
assert clock_event_loop.time() == 0
9391

92+
@pytest.mark.asyncio_clock
93+
async def test_clock_loop_advance_time(clock_event_loop):
94+
"""
95+
Test the sliding time event loop fixture
96+
"""
9497
async def short_nap():
9598
await asyncio.sleep(1)
9699

@@ -99,9 +102,9 @@ async def short_nap():
99102
assert not task.done()
100103

101104
# start the task
102-
clock_event_loop.advance_time(0)
105+
await clock_event_loop.advance_time(0)
103106
assert not task.done()
104107

105108
# process the timeout
106-
clock_event_loop.advance_time(1)
109+
await clock_event_loop.advance_time(1)
107110
assert task.done()

0 commit comments

Comments
 (0)