Registry / testing / pytest-circleci-parallelized

pytest-circleci-parallelized

JSON →
library0.1.0pypypi✓ verified 86d ago

A pytest plugin to automatically split test execution across CircleCI parallel containers. Currently at v0.1.0, it distributes tests by timings or file path hash. Low release cadence; last release was initial.

pip install pytest-circleci-parallelized
INSTALL
IMPORT
SIG · PYTEST-CIRCLECI-PA
P
pytest-circleci-parallelized
testingpythonv0.1.0
Install
3.6s avg
Import
366ms
Disk
30MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.382s · 32.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.6s · import 0.350s · 33MB
30MB installed
● package 30MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pytest
import pytest
Plugin auto-registers via conftest; no direct import needed.

Install the plugin and run pytest with --circleci-parallelize flag in a CircleCI job with parallelism > 1.

# Ensure CIRCLE_NODE_TOTAL and CIRCLE_NODE_INDEX are set # In CircleCI config, set parallelism > 1 # Then run: # pip install pytest-circleci-parallelized # pytest --circleci-parallelize
Debug
Known issues
gotchaPlugin requires CircleCI environment variables (CIRCLE_NODE_TOTAL and CIRCLE_NODE_INDEX). If running locally, these won't be set and the plugin will fail or do nothing.
fix
Only use in CircleCI parallel containers. For local testing, mock environment variables or run without the --circleci-parallelize flag.
affects: all
gotchaThe plugin may not distribute tests evenly if timings data is missing. It falls back to file path hashing which can be unbalanced.
fix
Run without timings first to generate JUnit XML, then supply --store-timings to collect data.
affects: all
deprecatedRequires Python 2.7 or 3.4+ (not 3.0-3.3). No support for Python 3.13+ tested.
fix
Ensure Python version >=2.7, !=3.0-3.3.
affects: all
Errors
Common errors & fixes
UsageError: --circleci-parallelize requires CIRCLE_NODE_TOTAL and CIRCLE_NODE_INDEX to be set
Plugin checks environment variables; missing when not running on CircleCI or in a non-parallel job.
fix
Set environment variables manually for testing: export CIRCLE_NODE_TOTAL=2; export CIRCLE_NODE_INDEX=0. Or run pytest without --circleci-parallelize.
No tests were found
Plugin may not collect tests if file patterns don't match or if test path is not detected.
fix
Check that test files follow pytest naming conventions (test_*.py) and are in the current directory. Run pytest --collect-only first.
Upgrade
Version history
0.1.0latest on PyPI · released Oct 20, 2022
Audit
Dependencies
pytestrequiredPlugin extends pytest; must be installed
circlecioptionalUses CircleCI environment variables (CIRCLE_NODE_INDEX, CIRCLE_NODE_TOTAL)
Agent activity
10 hits · last 30 days
node
8
Resources
pytest-circleci-parallelized — pip install pytest-circleci-parallelized · libregistry