Skip to content

test: run the suite under pytest-xdist - #96

Merged
geuben merged 1 commit into
mainfrom
chore/xdist-parallel-tests
Sep 3, 2026
Merged

test: run the suite under pytest-xdist#96
geuben merged 1 commit into
mainfrom
chore/xdist-parallel-tests

Conversation

@geuben

@geuben geuben commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add pytest-xdist to the dev group and set addopts = ["-n", "auto"], so the suite runs in parallel locally and in CI without changing the CI command. Every test already isolates itself via tmp_path, TDD_LEASE_DIR and TDD_LEDGER_HOME, so no test changes were needed.
  • Remove a no-op line in the repo fixture (git(...) if False else None) left over from an earlier edit.

Measured locally (10 cores): 461 tests in ~118s serial → ~28–35s parallel. The suite's cost is per-test process spawns (a real git repo plus real pytest and git subprocesses per test) rather than any individual slow test, so parallelism is the lever.

Run pytest -n0 to get serial output when debugging a single test.

Commits

129be14 test: run the suite under pytest-xdist; drop a no-op line in the repo fixture

Gates run

  • uv run pytest -q — 461 passed
  • uv run ruff check . — clean

Test coverage note

No decision-point operators in the diff (config and lockfile changes plus a removed no-op line); pseudo-mutation analysis has nothing to cover.

@geuben
geuben merged commit 3f397c4 into main Sep 3, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant