Run tests in parallel with free threading
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unittest_ft-0.5.tar.gz.
File metadata
- Download URL: unittest_ft-0.5.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9db0123a7c642035d8df9d5faa66cf5efa2fa0d28fc1e2ab64c1d1098f106e7d
|
|
| MD5 |
6ea8fb7788f236d54dbeffff860785be
|
|
| BLAKE2b-256 |
551f4f0d2ca2c6bf87120a6d4c20f5e51e67503b090d25c535a21edd64589181
|
Provenance
The following attestation bundles were made for unittest_ft-0.5.tar.gz:
Publisher:
ci.yml on amyreese/unittest-ft
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unittest_ft-0.5.tar.gz -
Subject digest:
9db0123a7c642035d8df9d5faa66cf5efa2fa0d28fc1e2ab64c1d1098f106e7d - Sigstore transparency entry: 229055431
- Sigstore integration time:
-
Permalink:
amyreese/unittest-ft@dfcaaad4c5b7b5a0b3f06e29fa6b1d0766b30579 -
Branch / Tag:
refs/tags/v0.5 - Owner: https://github.com/amyreese
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@dfcaaad4c5b7b5a0b3f06e29fa6b1d0766b30579 -
Trigger Event:
push
-
Statement type:
File details
Details for the file unittest_ft-0.5-py3-none-any.whl.
File metadata
- Download URL: unittest_ft-0.5-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
223368b46df38c98b88b72040610e0d767caa011cd920560276b8d271d62aa17
|
|
| MD5 |
8d48af9f759df98dda8985d6af3bfc94
|
|
| BLAKE2b-256 |
f31b49701484dbc339c591edbe9d3b455d5b7eaa810a2afb1996a40841fc86dd
|
Provenance
The following attestation bundles were made for unittest_ft-0.5-py3-none-any.whl:
Publisher:
ci.yml on amyreese/unittest-ft
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unittest_ft-0.5-py3-none-any.whl -
Subject digest:
223368b46df38c98b88b72040610e0d767caa011cd920560276b8d271d62aa17 - Sigstore transparency entry: 229055436
- Sigstore integration time:
-
Permalink:
amyreese/unittest-ft@dfcaaad4c5b7b5a0b3f06e29fa6b1d0766b30579 -
Branch / Tag:
refs/tags/v0.5 - Owner: https://github.com/amyreese
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@dfcaaad4c5b7b5a0b3f06e29fa6b1d0766b30579 -
Trigger Event:
push
-
Statement type: