skillfed

pytest-asyncio-concurrent

Pytest plugin to execute python async tests concurrently.

pytest-asyncio-concurrent v0.5.2 92.0K downloads/30d#13,486 on PyPI19
Permissive license The MIT License (MIT) Copyright (c) 2024 Zane Chen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),… (full text in the JSON record) Active released

What it is and what it does

pytest-asyncio-concurrent is a pytest plugin that runs async test functions concurrently in groups rather than sequentially, designed to speed up I/O or network-bound test suites. It extends pytest's test loop to batch setup, call, and teardown phases for all tests in a group, then executes them concurrently within that group using asyncio. Tests are grouped by their parent scope (e.g., all methods in a class, all functions in a file), and you can explicitly assign tests to named groups via the `asyncio_concurrent` mark or rely on a default grouping strategy.

The plugin accepts a `timeout` parameter on the mark to fail tests that exceed a time limit, and supports configuration via CLI flags or pytest config files. It works alongside pytest and is compatible with parametrized tests. The trade-off is that concurrent execution breaks the test isolation principle for non-function-scoped fixtures, so you must verify your tests are safe to run concurrently before using it.

Use it for:

  • Speed up integration test suites with many async I/O or network calls by running independent tests concurrently within the same class or module.
  • Reduce total test runtime for parametrized async tests by executing all parameter variants of a test concurrently when grouped.
  • Add per-test timeouts to catch hung async operations without blocking the entire test suite.
  • Run async tests concurrently while maintaining isolation at the group level, suitable for microservice or API test scenarios.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A pytest plugin that executes async test functions concurrently rather than sequentially, grouped by parent scope to control which tests run together.

Yes, if your test suite contains many async I/O-bound tests and you have verified that concurrent execution does not violate your fixture assumptions. The plugin is actively maintained, has no known vulnerabilities, and low install friction. Start with explicit grouping to control which tests run together, then validate that shared fixtures behave correctly under concurrent execution before relying on default grouping.

Install

pytest-asyncio-concurrent on PyPI

pip

pip install pytest-asyncio-concurrent

uv

uv add pytest-asyncio-concurrent

poetry

poetry add pytest-asyncio-concurrent

Installing pytest-asyncio-concurrent

Before you install

Low friction: pure Python wheel with only pytest as a runtime dependency. Active maintenance with recent commits; marked Beta but in use since late 2024.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

pip install pytest-asyncio-concurrent

@pytest.mark.asyncio_concurrent(group="my_group")
async def test_example():
    res = await wait_for_something_async()
    assert result.is_valid()

Requires Python 3.8 or later; concurrent execution breaks test isolation for non-function-scoped fixtures, so tests must be verified safe to run concurrently.

Verify before relying

  • Whether concurrent execution within a group truly eliminates fixture isolation concerns or merely defers them to group boundaries.
  • Performance gains on typical test suites and whether the overhead of group batching justifies concurrent execution for smaller test sets.
  • Compatibility edge cases with pytest plugins that also hook pytest_runtestloop.

Package facts

License The MIT License (MIT) Copyright (c) 2024 Zane Chen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 1 — pytest
Maintenance actively maintained — 127 days since the last release
Last repo commit
First released
Downloads 92,037/month — #13,486 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pytest_asyncio_concurrent-0.5.2-py3-none-any.whl

Development Status :: 4 - BetaFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Testing

Tags

pytest async concurrent executionparallel async tests pytestpytest asyncio concurrent groupsspeed up async test suiteconcurrent pytest async functionspytest async grouping pluginparallel I/O bound tests
async-testingtest-performancepytest-plugin

More Testing packages