pytest-asyncio is a
pytest plugin. It
facilitates testing of code that uses the
asyncio library.
Specifically, pytest-asyncio provides support for coroutines as test
functions. This allows users to await code inside their tests. For
example, the following code is executed as a test item by pytest:
@pytest.mark.asyncio
async def test_some_asyncio_code():
res = await library.do_something()
assert b"expected result" == res
Prevent DeprecationWarning to bubble up on CPython 3.10.9 and 3.11.1.
[#460](https://github.com/pytest-dev/pytest-asyncio/issues/460) <https://github.com/pytest-dev/pytest-asyncio/issues/460>_
0.20.2 (22-11-11)
Fixes an issue with async fixtures that are defined as methods on a test class not being rebound to the actual test instance. [#197](https://github.com/pytest-dev/pytest-asyncio/issues/197) <https://github.com/pytest-dev/pytest-asyncio/issues/197>_
Replaced usage of deprecated @pytest.mark.tryfirst with @pytest.hookimpl(tryfirst=True)[#438](https://github.com/pytest-dev/pytest-asyncio/issues/438) <https://github.com/pytest-dev/pytest-asyncio/pull/438>_
0.20.1 (22-10-21)
Fixes an issue that warned about using an old version of pytest, even though the most recent version was installed. [#430](https://github.com/pytest-dev/pytest-asyncio/issues/430) <https://github.com/pytest-dev/pytest-asyncio/issues/430>_
0.20.0 (22-10-21)
BREAKING: Removed legacy mode. If you're upgrading from v0.19 and you haven't configured asyncio_mode = legacy, you can upgrade without taking any additional action. If you're upgrading from an earlier version or you have explicitly enabled legacy mode, you need to switch to auto or strict mode before upgrading to this version.
Deprecate use of pytest v6.
Fixed an issue which prevented fixture setup from being cached. [#404](https://github.com/pytest-dev/pytest-asyncio/issues/404) <https://github.com/pytest-dev/pytest-asyncio/pull/404>_
0.19.0 (22-07-13)
BREAKING: The default asyncio_mode is now strict. [#293](https://github.com/pytest-dev/pytest-asyncio/issues/293) <https://github.com/pytest-dev/pytest-asyncio/issues/293>_
Removes setup.py since all relevant configuration is present setup.cfg. Users requiring an editable installation of pytest-asyncio need to use pip v21.1 or newer. [#283](https://github.com/pytest-dev/pytest-asyncio/issues/283) <https://github.com/pytest-dev/pytest-asyncio/issues/283>_
Declare support for Python 3.11.
0.18.3 (22-03-25)
Adds pytest-trio <https://pypi.org/project/pytest-trio/>_ to the test dependencies
Fixes a bug that caused pytest-asyncio to try to set up async pytest_trio fixtures in strict mode. [#298](https://github.com/pytest-dev/pytest-asyncio/issues/298) <https://github.com/pytest-dev/pytest-asyncio/issues/298>_
0.18.2 (22-03-03)
Fix asyncio auto mode not marking static methods. [#295](https://github.com/pytest-dev/pytest-asyncio/issues/295) <https://github.com/pytest-dev/pytest-asyncio/issues/295>_
Fix a compatibility issue with Hypothesis 6.39.0. [#302](https://github.com/pytest-dev/pytest-asyncio/issues/302) <https://github.com/pytest-dev/pytest-asyncio/issues/302>_
0.18.1 (22-02-10)
Fixes a regression that prevented async fixtures from working in synchronous tests. [#286](https://github.com/pytest-dev/pytest-asyncio/issues/286) <https://github.com/pytest-dev/pytest-asyncio/issues/286>_
0.18.0 (22-02-07)
Raise a warning if @pytest.mark.asyncio is applied to non-async function. [#275](https://github.com/pytest-dev/pytest-asyncio/issues/275) <https://github.com/pytest-dev/pytest-asyncio/issues/275>_
Support parametrized event_loop fixture. [#278](https://github.com/pytest-dev/pytest-asyncio/issues/278) <https://github.com/pytest-dev/pytest-asyncio/issues/278>_
0.17.2 (22-01-17)
Require typing-extensions on Python`_
... (truncated)
Commits
007e8ec [fix] Prevent DeprecationWarning about existing event loops to bubble up into...
44ca3da Build(deps): Bump zipp from 3.10.0 to 3.11.0 in /dependencies/default (#455)
c3c601c Build(deps): Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.5.2 (#456)
a962e2b Build(deps): Bump importlib-metadata in /dependencies/default (#454)
56a393a Simplify README, move most content to a separate user documentation. (#448)
3c78732 Build(deps): Bump hypothesis in /dependencies/default (#453)
d6a9a72 Build(deps): Bump exceptiongroup in /dependencies/default (#451)
42da7a0 Build(deps): Bump hypothesis in /dependencies/default (#450)
0b281b1 Build(deps): Bump mypy from 0.990 to 0.991 in /dependencies/default (#446)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps pytest-asyncio from 0.15.1 to 0.20.3.
Release notes
Sourced from pytest-asyncio's releases.
... (truncated)
Changelog
Sourced from pytest-asyncio's changelog.
... (truncated)
Commits
007e8ec
[fix] Prevent DeprecationWarning about existing event loops to bubble up into...44ca3da
Build(deps): Bump zipp from 3.10.0 to 3.11.0 in /dependencies/default (#455)c3c601c
Build(deps): Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.5.2 (#456)a962e2b
Build(deps): Bump importlib-metadata in /dependencies/default (#454)56a393a
Simplify README, move most content to a separate user documentation. (#448)3c78732
Build(deps): Bump hypothesis in /dependencies/default (#453)d6a9a72
Build(deps): Bump exceptiongroup in /dependencies/default (#451)42da7a0
Build(deps): Bump hypothesis in /dependencies/default (#450)0b281b1
Build(deps): Bump mypy from 0.990 to 0.991 in /dependencies/default (#446)d39589c
Update pre-commit hooks (#449)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)