Checklist
What is the idea?
test_examples.py currently runs as a single serial pytest step per OS/Python/conda-standalone matrix entry in main.yml. Investigate splitting it across multiple parallel jobs/runners per OS, and decide on an approach.
Options to look into:
pytest-split (available on conda-forge) — balances test groups by recorded duration; needs a --durations-based baseline, or falls back to even count-splitting.
- Manual
-k/marker-based grouping — no new dependency; tests grouped by hand into buckets and run separately per shard via -k.
Note: some tests touch OS-global state (Windows registry, Start Menu, macOS keychain, a hardcoded C:/ProgramData/conda/.condarc, fixed Docker image tags). Running shards as separate CI jobs/runners avoids collisions from this; running them concurrently on one machine (e.g. pytest-xdist -n auto in a single job) would not, without further changes.
Why is this needed?
Reduce test times, Illustrative arithmetic (current full-run time ÷ N, no overhead accounted for):
| OS |
Full run |
÷2 |
÷3 |
÷4 |
| Windows |
~100 min |
~50 min |
~33 min |
~25 min |
| macOS |
~85 min |
~43 min |
~28 min |
~21 min |
| Linux |
~30 min |
~15 min |
~10 min |
~8 min |
What should happen?
Examples split into multiple runners, reducing overall testing time.
Additional Context
Decisions needed
- Which mechanism to use (
pytest-split vs. manual grouping).
- Number of shards per OS.
- Whether shard boundaries should be based on measured per-test timing (
pytest --durations=0) rather than a manual guess.
- How to handle steps that assume one test run per matrix entry: coverage upload (Codecov
integration flag), the installers-* artifact upload, and the check-docs-schema step.
Notes:
pytest-xdist-style same-machine parallelization should not be attempted without first auditing tests that mutate shared OS-global state (e.g. test_initialization registry writes, conftest.py keychain mutation, test_uninstallation_standalone's hardcoded .condarc path, test_docker_image_build's fixed image tag).
- This issue is for deciding shard count and split mechanism; implementation should follow in a separate PR.
Checklist
What is the idea?
test_examples.pycurrently runs as a single serialpyteststep per OS/Python/conda-standalone matrix entry inmain.yml. Investigate splitting it across multiple parallel jobs/runners per OS, and decide on an approach.Options to look into:
pytest-split(available on conda-forge) — balances test groups by recorded duration; needs a--durations-based baseline, or falls back to even count-splitting.-k/marker-based grouping — no new dependency; tests grouped by hand into buckets and run separately per shard via-k.Note: some tests touch OS-global state (Windows registry, Start Menu, macOS keychain, a hardcoded
C:/ProgramData/conda/.condarc, fixed Docker image tags). Running shards as separate CI jobs/runners avoids collisions from this; running them concurrently on one machine (e.g.pytest-xdist -n autoin a single job) would not, without further changes.Why is this needed?
Reduce test times, Illustrative arithmetic (current full-run time ÷ N, no overhead accounted for):
What should happen?
Examples split into multiple runners, reducing overall testing time.
Additional Context
Decisions needed
pytest-splitvs. manual grouping).pytest --durations=0) rather than a manual guess.integrationflag), theinstallers-*artifact upload, and thecheck-docs-schemastep.Notes:
pytest-xdist-style same-machine parallelization should not be attempted without first auditing tests that mutate shared OS-global state (e.g.test_initializationregistry writes,conftest.pykeychain mutation,test_uninstallation_standalone's hardcoded.condarcpath,test_docker_image_build's fixed image tag).