-
Notifications
You must be signed in to change notification settings - Fork 143
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
"Task exception was never retrieved" warning with Skipped exception #123
Comments
Should be fixed by #126. |
blueyed
added a commit
that referenced
this issue
Jul 16, 2019
Asyncio doesn't get the results of tasks that fail with exceptions that don't subclass `Exception` (like pytest's `Skipped`) in `run_until_complete`. This leads to asyncio logging noisily warnings when pytest's skip functionality is mixed with this plugin. This fixes this error, and adds a test. Fixes #123. Co-Authored-By: Daniel Hahler <[email protected]> Co-Authored-By: Andrew Svetlov <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Skipped
exception used by pytest (e.g.pytest.importorskip
) is derived fromBaseException
, and therefore is not caught byasyncio.events
's_run
:Ref: https://github.com/pytest-dev/pytest/blob/865e84d206581f77640cfbc1516aff7a0d7316c6/src/_pytest/outcomes.py#L36
https://github.com/blueyed/cpython/blob/443fe5a52a3d6a101795380227ced38b4b5e0a8b/Lib/asyncio/events.py#L79-L94
This results in the following warning/error when using it in an async test:
The text was updated successfully, but these errors were encountered: