concurrencytest
Run unittest test suites concurrently
What it is and what it does
concurrencytest wraps the standard unittest TestSuite to run tests in parallel across multiple worker processes instead of sequentially. It uses fork-based process spawning and distributes individual tests or test classes to workers, defaulting to one process per CPU core. The package provides two partitioning strategies: round-robin (default) spreads tests evenly to avoid load imbalance, and class-local groups all tests from the same TestCase class onto a single worker to preserve setUpClass/tearDownClass semantics.
The package is designed for developers who want to speed up long-running test suites without rewriting their tests. It integrates directly with unittest's standard test loading and running infrastructure, so existing test code requires only a wrapper around the suite object. Dependencies on testtools and python-subunit provide the underlying test distribution and result aggregation machinery.
Use it for:
- Speed up a large unittest suite that runs sequentially in 10+ seconds by distributing tests across CPU cores.
- Run integration tests that are I/O-bound (database, network) in parallel to reduce total wall-clock time.
- Preserve test class lifecycle (setUpClass/tearDownClass) while parallelizing by using partition_tests_by_class.
- Distribute tests across a fixed number of worker processes (e.g., 4) to control resource usage on CI systems.
- Benchmark test suite performance improvements by comparing sequential vs. concurrent execution times.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Runs unittest test suites concurrently across multiple worker processes, distributing tests via round-robin or class-local partitioning to speed up test execution.
Yes, if you use unittest and need faster test execution on Unix-like systems. Low install friction, active maintenance, no vulnerabilities, and straightforward integration make it a practical choice. No if you use Windows, pytest, or have a copyleft-incompatible license requirement. Yes-with-conditions if your tests depend on shared module state or require careful isolation—verify that parallel execution doesn't break test assumptions.
Install
concurrencytest on PyPI
pip
pip install concurrencytestuv
uv add concurrencytestpoetry
poetry add concurrencytestInstalling concurrencytest
Before you install
Low install friction; pure Python wheel with only two runtime dependencies (testtools and python-subunit). Actively maintained with recent commits and no known vulnerabilities.
License in practice
GPL-2.0-or-later (copyleft) means any code that links this package must be distributed under compatible terms. Acceptable for internal tools and open-source projects, but problematic for proprietary software.
Quickstart
import unittest
from concurrencytest import ConcurrentTestSuite
suite = unittest.defaultTestLoader.loadTestsFromTestCase(MyTestCase)
concurrent_suite = ConcurrentTestSuite(suite)
unittest.TextTestRunner().run(concurrent_suite)
Requires Unix-like OS with os.fork() support (Linux, macOS, BSD); does not work on Windows. Requires Python 3.10 or later.
Verify before relying
- Whether test isolation is guaranteed when tests share module-level state or fixtures across worker processes.
- Performance characteristics with very large test suites or tests with significant setup/teardown overhead.
- Compatibility with pytest or other test runners beyond unittest.
Package facts
| License | GPL-2.0-or-later (copyleft) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — python-subunit, testtools |
| Maintenance | actively maintained — 154 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 363,276/month — #7,224 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: concurrencytest-0.1.11-py3-none-any.whl
Keywords: test, testing, testtools, unittest, concurrency, parallel
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pytest-asyncio-concurrentA pytest plugin that executes async test…
permissive · top 15,000 on PyPI
stestrstestr is a parallel test runner for Python…
permissive · top 15,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
pytest-parallelA pytest plugin that runs tests in parallel…
permissive · top 15,000 on PyPI
robotframework-pabotPabot splits Robot Framework test execution…
permissive · top 5,000 on PyPI
testscenariostestscenarios extends Python's unittest to run…
permissive · top 15,000 on PyPI
testresourcestestresources extends unittest to manage…
permissive · top 15,000 on PyPI
pytest-test-groupspytest-test-groups is a pytest plugin that…
permissive · top 5,000 on PyPI
pytest-splitA pytest plugin that divides a test suite into…
permissive · top 5,000 on PyPI
pytest-split-testsA pytest plugin that splits your test suite…
permissive · top 15,000 on PyPI