pytest-asyncio is a Python library used for testing asyncio code with pytest.
asyncio code is usually written in the form of coroutines, which makes it
slightly more difficult to test using normal testing tools. pytest-asyncio
provides useful fixtures and markers to make testing easier.
This package provides the legacy version 0.21 for test suites not compatible
with the breaking changes of 0.23
Provides
Requires
License
Apache-2.0
Changelog
* Mon Nov 17 2025 Daniel Garcia <daniel.garcia@suse.com>
- Skip some tests that are failing with pytest 3.14
* Wed Nov 13 2024 Markéta Machová <mmachova@suse.com>
- Update to 0.21.2
* Fix compatibility with pytest 8.2.
* Addresses a Hypothesis health check that leads to failing tests.
- Drop merged hypothesis-health-check.patch
* Tue Mar 05 2024 Ben Greiner <code@bnavigator.de>
- Copy to legacy package pytest-asyncio0.21 for test suites
not compatible with 0.23
* Tue Nov 07 2023 Dirk Müller <dmueller@suse.com>
- remove unnecessary dependency on async_generator
* Tue Oct 17 2023 Markéta Machová <mmachova@suse.com>
- Add hypothesis-health-check.patch to fix tests
* Mon Jul 24 2023 Dirk Müller <dmueller@suse.com>
- update to 0.21.1:
* Output a proper error message when an invalid
``asyncio_mode`` is selected.
* Extend warning message about unclosed event loops with
additional possible cause.
* Previously, some tests reported "skipped" or "xfailed" as a
result. Now all tests report a "success" result.
* Thu May 04 2023 Dirk Müller <dmueller@suse.com>
- update to 0.21.0:
* Drop compatibility with pytest 6.1. Pytest-asyncio now
depends on pytest 7.0 or newer.
* pytest-asyncio cleans up any stale event loops when setting
up and tearing down the event_loop fixture.
* Fri Apr 21 2023 Dirk Müller <dmueller@suse.com>
- add sle15_python_module_pythons (jsc#PED-68)
* Thu Apr 13 2023 Matej Cepl <mcepl@suse.com>
- Make calling of %{sle15modernpython} optional.
* Fri Dec 09 2022 Daniel Garcia <daniel.garcia@suse.com>
- Update to 0.20.3:
* Prevent DeprecationWarning to bubble up on CPython 3.10.9 and 3.11.1. #460
* Wed Nov 30 2022 Daniel Garcia <daniel.garcia@suse.com>
- Update to 0.20.2:
* Fixes an issue with async fixtures that are defined as methods on a test
class not being rebound to the actual test instance. #197
* Replaced usage of deprecated @pytest.mark.tryfirst with
@pytest.hookimpl(tryfirst=True) #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
- 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
* Fri Aug 05 2022 John Vandenberg <jayvdb@gmail.com>
- Update to 0.19.0
* BREAKING: The default ``asyncio_mode`` is now *strict*.
* Removes `setup.py` since all relevant configuration is present
`setup.cfg`.
* Declare support for Python 3.11
* Wed Jul 06 2022 Steve Kowalik <steven.kowalik@suse.com>
- Inject multibuild to defeat a build loop
* Tue Jun 28 2022 Ben Greiner <code@bnavigator.de>
- Update to 0.18.3
* Adds 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
- Release 0.18.2
* Fix asyncio auto mode not marking static methods. #295
* Fix a compatibility issue with Hypothesis 6.39.0. #302
- Release 0.18.1
* Fixes a regression that prevented async fixtures from working
in synchronous tests. #286
- Release 0.18.0
* Raise a warning if @pytest.mark.asyncio is applied to non-async
function. #275
* Support parametrized event_loop fixture. #278
* Thu Jan 20 2022 Ben Greiner <code@bnavigator.de>
- Update to 0.17.2
* Require typing-extensions on Python<3.8 only. #269
* Fix a regression in tests collection introduced by 0.17.1, the
plugin works fine with non-python tests again. #267
- Release notes for 0.17.1
* Fixes a bug that prevents async Hypothesis tests from working
without explicit asyncio marker when --asyncio-mode=auto is
set