We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1203ea9 commit 3492ce0Copy full SHA for 3492ce0
1 file changed
tests/test_run.py
@@ -25,7 +25,8 @@ def test_run_with_contextmanager(get_event_loop_coro):
25
with pytest.raises(RuntimeError):
26
_ = asyncio.get_event_loop()
27
28
-def test_run_with_existing_eventloop(get_event_loop_coro, expected_loop):
29
- asyncio.set_event_loop(asyncio.new_event_loop())
+def test_run_reset_policy(get_event_loop_coro, expected_loop):
+ old_loop = asyncio.new_event_loop()
30
qasync.run(get_event_loop_coro())
31
- assert asyncio.get_event_loop() != expected_loop
+ new_loop = asyncio.new_event_loop()
32
+ assert type(old_loop) == type(new_loop)
0 commit comments