--- id: concurrencytest version: "0.1.11" license: GPL-2.0-or-later license_treatment: copyleft maintenance: active --- # concurrencytest — Run unittest test suites concurrently License: copyleft · Maintenance: active · Downloads: 363.3K/mo ## 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 above — 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 pip install concurrencytest uv add concurrencytest 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_current - Install friction: low - Maintenance: active - Downloads: 363.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags parallel unittest execution, concurrent test runner, unittest multiprocess, speed up test suite, distributed test execution, fork-based test parallelization, unittest load balancing, test-parallelization, unittest-extension, performance-optimization [View on SkillFed](https://skillfed.io/packages/concurrencytest) · [View on PyPI](https://pypi.org/project/concurrencytest/)