Sourced from pytest-asyncio's releases.
pytest-asyncio 0.17.0
title: 'pytest-asyncio: pytest support for asyncio'
pytest-asyncio is an Apache2 licensed library, written in Python, 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.
@pytest.mark.asyncio async def test_some_asyncio_code(): res = await library.do_something() assert b"expected result" == res
pytest-asyncio has been strongly influenced by pytest-tornado.
Features
- fixtures for creating and injecting versions of the asyncio event loop
- fixtures for injecting unused tcp/udp ports
- pytest markers for treating tests as asyncio coroutines
- easy testing with non-default event loops
- support for [async def]{.title-ref} fixtures and async generator fixtures
- support auto mode to handle all async fixtures and tests automatically by asyncio; provide strict mode if a test suite should work with different async frameworks simultaneously, e.g.
asyncio
andtrio
.Installation
... (truncated)
2e2d5d2
Bump to 0.17 release90436c9
Fix pandoc installation procedured291c66
Convert README.rst to Markdown for making githun release141937b
Fix release artifacts696cf7d
Fix trove classifier for asyncio8ccb306
Build on tagcd84987
Release process automation (#252)2eb12a7
Setup GitHub Workflows linter and yaml-reformatter (#253)d28b826
Bump codecov/codecov-action from 1 to 2.1.0 (#251)2f523ba
Configure dependabot version updater (#250)