Skip to content

chore: speed up test suite with pytest-xdist parallelization#3872

Draft
maxrjones wants to merge 5 commits intozarr-developers:mainfrom
maxrjones:use-xdist
Draft

chore: speed up test suite with pytest-xdist parallelization#3872
maxrjones wants to merge 5 commits intozarr-developers:mainfrom
maxrjones:use-xdist

Conversation

@maxrjones
Copy link
Copy Markdown
Member

A small change to speed up testing locally and in the CI:

  • Enable pytest-xdist parallel execution (-n auto) in run, run-coverage, and run-coverage-html hatch scripts. pytest-xdist was already a dependency but wasn't being used.
  • Fix test_docstring_consistent_parameters parametrize IDs that included function memory addresses (e.g. <function create_array at 0x10a06d760>), causing xdist workers to disagree on test collection.

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.md
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@github-actions github-actions bot added the needs release notes Automatically applied to PRs which haven't added release notes label Apr 5, 2026
@maxrjones maxrjones changed the title Speed up test suite with pytest-xdist parallelization chore: speed up test suite with pytest-xdist parallelization Apr 5, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.00%. Comparing base (dd86ac7) to head (5b00151).

❗ There is a different number of reports uploaded between BASE (dd86ac7) and HEAD (5b00151). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (dd86ac7) HEAD (5b00151)
tests 7 6
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3872       +/-   ##
===========================================
- Coverage   92.91%   55.00%   -37.91%     
===========================================
  Files          86       86               
  Lines       10709    10709               
===========================================
- Hits         9950     5891     -4059     
- Misses        759     4818     +4059     

see 66 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maxrjones maxrjones marked this pull request as ready for review April 6, 2026 01:59
@maxrjones maxrjones marked this pull request as draft April 6, 2026 02:00
@maxrjones maxrjones self-assigned this Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs release notes Automatically applied to PRs which haven't added release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant