pytest-split
Pytest plugin which splits the test suite to equally sized sub suites based on test execution time.
Decision gist · record as of 2026-08-14
Yes. Low install friction, active maintenance, no security vulnerabilities, and MIT licensing make this a safe choice. Install it if you run tests in parallel CI and want to avoid the unbalanced execution times that naive splitting produces. Skip it only if you use test randomization plugins and cannot coordinate a shared seed across workers.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Incompatible with pytest-randomly or pytest-random-order unless a global random seed is pre-computed and passed via --random-order-seed to all groups.
- Low friction: pure Python wheel with only pytest as a runtime dependency.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
last release 2026-02-03 (192 days) · last repo commit 2026-03-01 · 323 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 20,969,797 downloads/mo, #1,020 on PyPI
Alternatives
Verify before relying
pip install pytest-split
# First run: store test durations
pytest --store-durations
# Then split across workers
pytest --splits 3 --group 1 # worker 1
pytest --splits 3 --group 2 # worker 2
pytest --splits 3 --group 3 # worker 3- Whether the .test_durations file format is stable across versions and safe to commit to version control
- Performance impact of the splitting algorithm on large test suites
- Compatibility details with CI/CD platforms beyond the GitHub Actions demo
What it is and what it does
pytest-split is a pytest plugin that organizes test execution into balanced parallel groups by analyzing how long each test takes to run. It stores test duration data in a .test_durations file, then uses that history to divide tests into sub-suites with roughly equal total execution time. This is useful for CI pipelines where you want to run tests in parallel across multiple workers without some workers finishing much earlier than others.
The plugin handles test suite changes gracefully: new tests get assigned an average duration estimate, and removed tests are simply skipped. It offers two splitting algorithms—duration_based_chunks (maintains absolute test order) and least_duration (better balance, works with test randomization)—and includes special handling for notebook-based tests via nbval integration. The main constraint is incompatibility with test randomization plugins when using the default algorithm, though a workaround exists via shared random seeds.
Use it for
- Divide a test suite across multiple CI workers to parallelize builds while keeping wall-clock time balanced.
- Identify and list the slowest tests in your suite using the slowest-tests CLI command for optimization.
- Maintain test order stability in fragile suites that depend on execution sequence while still splitting for parallel CI.
- Automatically handle new and removed tests without re-running --store-durations after every change.
- Run notebook-based tests split across groups without breaking imports or cell dependencies.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, active maintenance, no security vulnerabilities, and MIT licensing make this a safe choice. Install it if you run tests in parallel CI and want to avoid the unbalanced execution times that naive splitting produces. Skip it only if you use test randomization plugins and cannot coordinate a shared seed across workers.
Install
pytest-split on PyPI
Before you install
Low friction: pure Python wheel with only pytest as a runtime dependency. Actively maintained with recent releases; last commit 2026-03-01 and 323 repository stars indicate ongoing support.
Requires Python 3.10 or later. Incompatible with pytest-randomly or pytest-random-order unless a global random seed is pre-computed and passed via --random-order-seed to all groups.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install pytest-split
# First run: store test durations
pytest --store-durations
# Then split across workers
pytest --splits 3 --group 1 # worker 1
pytest --splits 3 --group 2 # worker 2
pytest --splits 3 --group 3 # worker 3
Verify before relying
- Whether the .test_durations file format is stable across versions and safe to commit to version control
- Performance impact of the splitting algorithm on large test suites
- Compatibility details with CI/CD platforms beyond the GitHub Actions demo
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepytest |
| Maintenance | Actively maintained 192 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 20,969,797 / month, #1,020 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming 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 ModulesTyping :: Typed |
Evidence: pytest_split-0.11.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pytest test suite splitting”
- pytest-splitA pytest plugin that divides a test suite into balanced groups based…
- pytest-circleci-parallelizedAdds a pytest plugin that automatically distributes tests across…
- pytest-split-testsA pytest plugin that splits your test suite into equal-sized groups…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also pytest-split-tests · pytest-test-groups · pytest-circleci-parallelized · pytest-item-dict · pytest-xdist · pytest-extra-durations · pytest-random-order · pytest-randomly · pytest-reverse · pytest-durations