unittest-ft
Run Python tests in parallel with free threading
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)
| File | Size | Uploaded | |
|---|---|---|---|
| unittest_ft-0.5.tar.gz | 6.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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