Skip to main content

unittest-ft

Run Python tests in parallel with free threading

version license

Alternative to the standard unittest runner that spawns a thread pool, and runs every test individually on separate threads, in parallel, to both run tests faster and to assist with validating the thread safety of the tested system.

unittest-ft also includes options to run "stress tests" which queues every test to be run ten times rather than just once, as well as randomizing the test order every time to help catch unintended test order dependencies.

This is intended for use with Python 3.13 or newer with Free Threading enabled, but is functionally compatible back to Python 3.8 for use in multi-version CI.

Install

$ pip install unittest-ft

Usage

Run your test suite:

$ unittest-ft [<module>]
s...xx.
----------------------------------------------------------------------
Ran 7 tests in 463.69ms

OK (skipped=1, expected failures=2)

If you can spare the time/cores, run a randomized stress test:

$ unittest-ft --randomize --stress-test [<module>]
.s...xs.xsxx.xx....xxx..xsxx.x.s.x...xs.xsxx....xx...s..ss............
----------------------------------------------------------------------
Ran 70 tests in 1.240s (saved 9.988s)

OK (skipped=10, expected failures=20)

License

unittest-ft is copyright Amethyst Reese, and licensed under the MIT license.

Metadata

Release files for unittest-ft 0.5

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

Source distribution (sdist)

Source distribution for unittest-ft 0.5
File Size Uploaded
unittest_ft-0.5.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unittest-ft 0.5
File Interpreter ABI Platform
unittest_ft-0.5-py3-none-any.whl Python 3 none any Details

Total release size: 15.3 kB

Release files / unittest_ft-0.5.tar.gz

Download URL unittest_ft-0.5.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9db0123a7c642035d8df9d5faa66cf5efa2fa0d28fc1e2ab64c1d1098f106e7d
BLAKE2b-256 checksum
How to use checksums
551f4f0d2ca2c6bf87120a6d4c20f5e51e67503b090d25c535a21edd64589181
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Jun 3, 2025.

Transparency log

Release files / unittest_ft-0.5-py3-none-any.whl

Download URL unittest_ft-0.5-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
223368b46df38c98b88b72040610e0d767caa011cd920560276b8d271d62aa17
BLAKE2b-256 checksum
How to use checksums
f31b49701484dbc339c591edbe9d3b455d5b7eaa810a2afb1996a40841fc86dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Jun 3, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.5 This release

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

0

2 release files

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