Sitelet https://github.com/pytest-dev/pytest-asyncio/pull/126
Skip to content

No warning on skip in asyncio - #126

Merged
blueyed merged 3 commits into
pytest-dev:masterfrom
jcrist:no-warning-on-skip
Jul 16, 2019
Merged

blueyed merged 3 commits into
pytest-dev:masterfrom
jcrist:no-warning-on-skip

Conversation

@jcrist

@jcrist jcrist commented Jul 2, 2019

Copy link
Copy Markdown
Contributor

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.
Comment thread tests/test_simple.py Outdated
Co-Authored-By: Daniel Hahler <github@thequod.de>
@jcrist

jcrist commented Jul 2, 2019

Copy link
Copy Markdown
Contributor Author

Should be good to go.

Comment thread pytest_asyncio/plugin.py Outdated
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

jcrist commented Jul 16, 2019

Copy link
Copy Markdown
Contributor Author

Can this be merged?

@asvetlov

Copy link
Copy Markdown
Contributor

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

@jcrist

jcrist commented Jul 16, 2019

Copy link
Copy Markdown
Contributor Author

cc @Tinche

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

blueyed commented Jul 16, 2019

Copy link
Copy Markdown
Contributor

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