File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,12 @@ def test_async_close_loop(event_loop):
88
88
return 'ok'
89
89
90
90
91
- def test_clock_loop (clock_event_loop ):
92
- assert clock_event_loop .time () == 0
93
91
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
+ """
94
97
async def short_nap ():
95
98
await asyncio .sleep (1 )
96
99
@@ -99,9 +102,9 @@ async def short_nap():
99
102
assert not task .done ()
100
103
101
104
# start the task
102
- clock_event_loop .advance_time (0 )
105
+ await clock_event_loop .advance_time (0 )
103
106
assert not task .done ()
104
107
105
108
# process the timeout
106
- clock_event_loop .advance_time (1 )
109
+ await clock_event_loop .advance_time (1 )
107
110
assert task .done ()
You can’t perform that action at this time.
0 commit comments