Skip to content

Commit 2471d9c

Browse files
committed
better test
1 parent ef42a83 commit 2471d9c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/test_run.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ def test_run_with_contextmanager(get_event_loop_coro):
2525
with pytest.raises(RuntimeError):
2626
_ = asyncio.get_event_loop()
2727

28-
def test_run_with_existing_eventloop(get_event_loop_coro, expected_loop):
29-
asyncio.set_event_loop(asyncio.new_event_loop())
28+
def test_run_reset_policy(get_event_loop_coro, expected_loop):
29+
old_loop = asyncio.new_event_loop()
3030
qasync.run(get_event_loop_coro())
31-
assert asyncio.get_event_loop() != expected_loop
31+
new_loop = asyncio.new_event_loop()
32+
assert type(old_loop) == type(new_loop)

0 commit comments

Comments
 (0)