Skip to content

Commit

Permalink
close event loop after each test
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Feb 18, 2024
1 parent 3bbe7ad commit e199217
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pytest_jupyter/jupyter_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
@pytest.fixture(autouse=True)
def jp_asyncio_loop():
"""Get an asyncio loop."""
return ensure_event_loop(prefer_selector_loop=True)
loop = ensure_event_loop(prefer_selector_loop=True)
yield loop
loop.close()


@pytest.hookimpl(tryfirst=True)
Expand Down

0 comments on commit e199217

Please sign in to comment.