Skip to main content

pytest-turbo

Runs your pytest suite in parallel, about twice as fast as pytest-xdist, while running real pytest: your plugins, fixtures, conftest files, unittest.TestCase classes and test classes keep working.

Alpha. Compare its test counts with plain pytest before relying on it.

Install

uv add --dev pytest-turbo     # or: pip install pytest-turbo

Use

pytest-turbo                       # every test, one worker per CPU
pytest-turbo -n 8 tests/api        # 8 workers, one directory
pytest-turbo -x                    # stop at the first failure
pytest-turbo -- -k slow --tb=long  # anything after -- goes to pytest

It runs pytest with the Python of $VIRTUAL_ENV, else the nearest .venv, else the environment it is installed in. --python picks another.

Why it's faster than xdist

  • Each worker imports only the files it runs. xdist collects the whole suite in every worker, so every worker pays for importing every test module.
  • Slowest first. Durations from earlier runs are kept in .pytest-turbo/, and the slowest files go out first, so no worker is left running a long file at the end.
  • Long files are split. A file that would take longer than a worker's fair share runs on several workers at once. Each worker collects the whole file and runs its share of it, so a file that changed since the last run is still covered in full. --no-split turns this off, for suites with expensive class setup.
  • Discovery doesn't import anything. It walks the tree using your python_files, testpaths and norecursedirs settings, in milliseconds.

On two real suites, compared with pytest -n auto --dist loadfile:

Suite xdist pytest-turbo
1,272 unit tests, 18 workers 15–21 s 7.5–12 s
1,603 tests against Postgres and ScyllaDB, 8 workers 23–26 s 17–21 s

Output

  • Failures appear as they happen. At the end, each failure is printed in full with its captured stdout, stderr and log output.
  • Tests that pass only after a retry from pytest-rerunfailures are reported as FLAKY.
  • The summary lists the slowest files.
  • When a worker crashes, a new one starts and the file it was running is retried once, so tests after the crash still run.

How it works

A Rust binary finds the test files, plans the order and runs one long-lived pytest process per worker. Each worker runs a small plugin (src/worker.py) that replaces pytest's collection and run loop. The plugin asks the binary for the next file, collects and runs it, and reports each result as a line of JSON.

Limits

  • Package-scoped fixtures are set up again for each file a worker runs.
  • No JUnit XML output yet.
  • Not tested on Windows.

Development

cargo test
uv run --with pytest --with pytest-rerunfailures python selfcheck.py  # runs pytest-turbo and plain pytest on a sample project and compares the results

Metadata

Release files for pytest-turbo 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-turbo 0.0.1
File Size Uploaded Provenance Actions
pytest_turbo-0.0.1.tar.gz 19.0 kB With provenance Details for pytest_turbo-0.0.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pytest-turbo 0.0.1
File Actions
pytest_turbo-0.0.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for pytest_turbo-0.0.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
pytest_turbo-0.0.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for pytest_turbo-0.0.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
pytest_turbo-0.0.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for pytest_turbo-0.0.1-py3-none-macosx_11_0_arm64.whl
pytest_turbo-0.0.1-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for pytest_turbo-0.0.1-py3-none-macosx_10_12_x86_64.whl

Total release size: 4.5 MB

Release files / pytest_turbo-0.0.1.tar.gz

Download URL pytest_turbo-0.0.1.tar.gz
Size 19.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d912aa5ccc98ab6276fe9e3075ba5e8231c67b02a27999152765d8f2dedc7eae
BLAKE2b-256 checksum
How to use checksums
c49b3947936e03c2fef61feeee088473652dea17c740c6d0bc7ebbb090f28269
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / pytest_turbo-0.0.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL pytest_turbo-0.0.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.2 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
a2a52cb5ac65a16186fda061d3d6ff42c18e0772c7774b1b0e279b1e5f9d4433
BLAKE2b-256 checksum
How to use checksums
baf69a6bf17663ce1e118466ecde45986319f86ba02d7e9cf84ac173a882ac0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / pytest_turbo-0.0.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL pytest_turbo-0.0.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.1 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
c58567fcb27878684310f951e3f0b991a79c5b6b6a74df416c3438d2b534806c
BLAKE2b-256 checksum
How to use checksums
0d9136b21cffabcae268c858fdddf3bb2fec5fd28dd2c06520a3c4b4835d0f3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / pytest_turbo-0.0.1-py3-none-macosx_11_0_arm64.whl

Download URL pytest_turbo-0.0.1-py3-none-macosx_11_0_arm64.whl
Size 1.1 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8b7ec8b01e46d65152ac8ae5a5f9fb4bdf80bc3030fd8ef8d36ae7cab0c6ecda
BLAKE2b-256 checksum
How to use checksums
79b24e6de28d01293da9d3fecc7103b46915755664649ee22eb93a8ae7548c59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / pytest_turbo-0.0.1-py3-none-macosx_10_12_x86_64.whl

Download URL pytest_turbo-0.0.1-py3-none-macosx_10_12_x86_64.whl
Size 1.1 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
a8ea568b23814271d4c8368ecbccee9e2f453cdf79204023301ed50c823300da
BLAKE2b-256 checksum
How to use checksums
fd6397fab36872abd12e606e96c43c1d3b4e557de6e636a139c2da60bfc8ef70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for pytest-turbo 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for pytest_turbo-0.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page