-
Notifications
You must be signed in to change notification settings - Fork 159
RuntimeError: Event loop is closed as of 0.11.0 in particular test setup #157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I tested your examples on PR #156 and it resolves the problems you describe |
adam-stokes
pushed a commit
to charmed-kubernetes/jenkins
that referenced
this issue
Apr 30, 2020
pytest-dev/pytest-asyncio#157 Signed-off-by: Adam Stokes <[email protected]>
@simonfagerholm Thanks for all your work looking into this and the related issues and getting your PR up. Much appreciated! |
marmarek
added a commit
to marmarek/qubes-core-qrexec
that referenced
this issue
May 2, 2020
pytest-asyncio 0.11.0 uses different loops for fixtures and the actual test and also closes event loop in some cases. Downgrade to 0.10.0 until it's fixed. pytest-dev/pytest-asyncio#154 pytest-dev/pytest-asyncio#157
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not entirely sure how to classify what is happening here, as it is happening in a very particular test setup. I've managed to strip down the tests to the bare minimum to reproduce.
Directory Structure
File Contents
tox.ini
test_app.py
test_example.py
Test Output
Notes
test_app.py
) run prior to the example test file is required for this error happen. renaming the file totest_zapp.py
so it runs aftertest_example.py
mitigates the issue.test_client
. I'm not sure if other things will produce a similar effect, but based on my specific use case, commenting out tests which used thetest_app
appeared to mitigate the problem.@pytest.mark.usefixtures
decorator is used, and that the fixture is an async function.@pytest.mark.asyncio
,@pytest.mark.usefixtures
) does not appear to matterpytest-asyncio==0.10.0
mitigates the issue as well, so this seems to be related to something that changed with the0.11.0
release.The text was updated successfully, but these errors were encountered: