Skip to content
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

No warning on skip in asyncio #126

Merged
merged 3 commits into from Jul 16, 2019
Merged

Conversation

jcrist
Copy link
Contributor

@jcrist jcrist commented Jul 2, 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 warning when
pytest's skip functionality is mixed with this plugin.

This fixes this error, and adds a test.

Fixes #123.

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 warning when
pytest's skip functionality is mixed with this plugin.

This fixes this error, and adds a test.
tests/test_simple.py Outdated Show resolved Hide resolved
Co-Authored-By: Daniel Hahler <github@thequod.de>
@jcrist
Copy link
Contributor Author

jcrist commented Jul 2, 2019

Should be good to go.

pytest_asyncio/plugin.py Outdated Show resolved Hide resolved
aecay added a commit to sky-uk/mite that referenced this pull request Jul 9, 2019
changes:
- introduce a new mite.utils.sleep function (so that tests donʼt sleep
  for a long time)
- change the base class of HandledException to work around a bug in
  pytest-asyncio (pytest-dev/pytest-asyncio#126)
- better async exception handling
- fix event loop handling in mite_http
- new mite.test module
aecay added a commit to sky-uk/mite that referenced this pull request Jul 9, 2019
changes:
- introduce a new mite.utils.sleep function (so that tests donʼt sleep
  for a long time)
- change the base class of HandledException to work around a bug in
  pytest-asyncio (pytest-dev/pytest-asyncio#126)
- better async exception handling
- fix event loop handling in mite_http
- new mite.test module
Co-Authored-By: Andrew Svetlov <andrew.svetlov@gmail.com>
@jcrist
Copy link
Contributor Author

jcrist commented Jul 16, 2019

Can this be merged?

@asvetlov
Copy link
Contributor

I think yes but I have no commit privilegy to do it myself.

@jcrist
Copy link
Contributor Author

jcrist commented Jul 16, 2019

cc @Tinche

@blueyed blueyed merged commit 86cd9a6 into pytest-dev:master Jul 16, 2019
@blueyed
Copy link
Contributor

blueyed commented Jul 16, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Task exception was never retrieved" warning with Skipped exception
3 participants