File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,24 @@ def test_async_close_loop(event_loop):
88
88
return 'ok'
89
89
90
90
91
+ @pytest .mark .asyncio_clock
92
+ async def test_mark_asyncio_clock ():
93
+ """
94
+ Test that coroutines marked with asyncio_clock are run with a ClockEventLoop
95
+ """
96
+ import pytest_asyncio
97
+ assert isinstance (asyncio .get_event_loop (), pytest_asyncio .plugin .ClockEventLoop )
98
+
99
+
100
+ def test_clock_loop_loop_fixture (clock_event_loop ):
101
+ """
102
+ Test that the clock_event_loop fixture returns a proper instance of the loop
103
+ """
104
+ import pytest_asyncio
105
+ assert isinstance (asyncio .get_event_loop (), pytest_asyncio .plugin .ClockEventLoop )
106
+ clock_event_loop .close ()
107
+ return 'ok'
108
+
91
109
92
110
@pytest .mark .asyncio_clock
93
111
async def test_clock_loop_advance_time (clock_event_loop ):
You can’t perform that action at this time.
0 commit comments