Skip to content

fix: keep local coverage central without xdist workers - #764

Open
Samuel-Hills wants to merge 1 commit into
pytest-dev:masterfrom
Samuel-Hills:fix/dist-without-workers-central
Open

Samuel-Hills wants to merge 1 commit into
pytest-dev:masterfrom
Samuel-Hills:fix/dist-without-workers-central

Conversation

@Samuel-Hills

Copy link
Copy Markdown

Summary

Fixes coverage setup when --dist is configured without any xdist execution
environments.

Previously, pytest-cov selected the distributed controller whenever --dist
was non-default, even when tests still ran in the current process. This
prevented subprocess coverage setup.

Changes

  • Select the distributed controller only when xdist has workers or execution
    environments.
  • Preserve existing behavior for -n and --tx runs.
  • Add regression coverage for bare --dist.

Validation

  • Full test suite: 204 passed, 6 skipped
  • Ruff check: passed
  • git diff --check: passed

Fixes #667.

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.

Subprocess coverage not set up correctly with xdist when passing --dist but not --numprocesses

1 participant