skillfed

concurrencytest

Run unittest test suites concurrently

concurrencytest v0.1.11 363.3K downloads/30d#7,224 on PyPI57
Copyleft license GPL-2.0-or-later Active released

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 concurrencytest

uv

uv add concurrencytest

poetry

poetry add concurrencytest

Installing 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

Intended Audience :: DevelopersIntended Audience :: Information TechnologyOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Testing

Tags

parallel unittest executionconcurrent test runnerunittest multiprocessspeed up test suitedistributed test executionfork-based test parallelizationunittest load balancing
test-parallelizationunittest-extensionperformance-optimization

More Python Modules packages