{"id":13482168,"url":"https://github.com/pytest-dev/pytest-asyncio","last_synced_at":"2025-05-14T22:06:17.099Z","repository":{"id":30205473,"uuid":"33756412","full_name":"pytest-dev/pytest-asyncio","owner":"pytest-dev","description":"Asyncio support for pytest","archived":false,"fork":false,"pushed_at":"2025-05-07T11:08:59.000Z","size":948,"stargazers_count":1499,"open_issues_count":52,"forks_count":159,"subscribers_count":35,"default_branch":"main","last_synced_at":"2025-05-07T21:58:32.441Z","etag":null,"topics":["asyncio","pytest-plugin","python","testing"],"latest_commit_sha":null,"homepage":"https://pytest-asyncio.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pytest-dev.png","metadata":{"files":{"readme":"README.rst","changelog":"changelog.d/+d874f4f1.changed.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.rst","support":"docs/support.rst","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-04-11T00:18:05.000Z","updated_at":"2025-05-07T11:09:02.000Z","dependencies_parsed_at":"2023-01-17T00:01:25.312Z","dependency_job_id":"28699dc0-7148-4da0-98e1-17068dffafc4","html_url":"https://github.com/pytest-dev/pytest-asyncio","commit_stats":{"total_commits":853,"total_committers":63,"mean_commits":13.53968253968254,"dds":0.6025791324736225,"last_synced_commit":"38ac4138428efc29923d50080364895c33d99b8d"},"previous_names":[],"tags_count":69,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-asyncio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-asyncio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-asyncio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-asyncio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pytest-dev","download_url":"https://codeload.github.com/pytest-dev/pytest-asyncio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235694,"owners_count":22036963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","pytest-plugin","python","testing"],"created_at":"2024-07-31T17:00:59.616Z","updated_at":"2025-05-14T22:06:17.055Z","avatar_url":"https://github.com/pytest-dev.png","language":"Python","readme":"pytest-asyncio\n==============\n\n.. image:: https://img.shields.io/pypi/v/pytest-asyncio.svg\n    :target: https://pypi.python.org/pypi/pytest-asyncio\n.. image:: https://github.com/pytest-dev/pytest-asyncio/workflows/CI/badge.svg\n    :target: https://github.com/pytest-dev/pytest-asyncio/actions?workflow=CI\n.. image:: https://codecov.io/gh/pytest-dev/pytest-asyncio/branch/main/graph/badge.svg\n    :target: https://codecov.io/gh/pytest-dev/pytest-asyncio\n.. image:: https://img.shields.io/pypi/pyversions/pytest-asyncio.svg\n    :target: https://github.com/pytest-dev/pytest-asyncio\n    :alt: Supported Python versions\n.. image:: https://img.shields.io/badge/Matrix-%23pytest--asyncio-brightgreen\n    :alt: Matrix chat room: #pytest-asyncio\n    :target: https://matrix.to/#/#pytest-asyncio:matrix.org\n\n`pytest-asyncio \u003chttps://pytest-asyncio.readthedocs.io/en/latest/\u003e`_ is a `pytest \u003chttps://docs.pytest.org/en/latest/contents.html\u003e`_ plugin. It facilitates testing of code that uses the `asyncio \u003chttps://docs.python.org/3/library/asyncio.html\u003e`_ library.\n\nSpecifically, 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:\n\n.. code-block:: python\n\n    @pytest.mark.asyncio\n    async def test_some_asyncio_code():\n        res = await library.do_something()\n        assert b\"expected result\" == res\n\nMore details can be found in the `documentation \u003chttps://pytest-asyncio.readthedocs.io/en/latest/\u003e`_.\n\nNote that test classes subclassing the standard `unittest \u003chttps://docs.python.org/3/library/unittest.html\u003e`__ library are not supported. Users\nare advised to use `unittest.IsolatedAsyncioTestCase \u003chttps://docs.python.org/3/library/unittest.html#unittest.IsolatedAsyncioTestCase\u003e`__\nor an async framework such as `asynctest \u003chttps://asynctest.readthedocs.io/en/latest\u003e`__.\n\n\npytest-asyncio is available under the `Apache License 2.0 \u003chttps://github.com/pytest-dev/pytest-asyncio/blob/main/LICENSE\u003e`_.\n\n\nInstallation\n------------\n\nTo install pytest-asyncio, simply:\n\n.. code-block:: bash\n\n    $ pip install pytest-asyncio\n\nThis is enough for pytest to pick up pytest-asyncio.\n\n\nContributing\n------------\nContributions are very welcome. Tests can be run with ``tox``, please ensure\nthe coverage at least stays the same before you submit a pull request.\n","funding_links":[],"categories":["Python","Topics Index","Testing Tools","测试","Testing"],"sub_categories":["Unit Testing","Python libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytest-dev%2Fpytest-asyncio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpytest-dev%2Fpytest-asyncio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytest-dev%2Fpytest-asyncio/lists"}