Skip to content

Fix xdist coverage merge with custom data file - #766

Open
AryanRG wants to merge 1 commit into
pytest-dev:masterfrom
AryanRG:fix/xdist-custom-coverage-data-file
Open

AryanRG wants to merge 1 commit into
pytest-dev:masterfrom
AryanRG:fix/xdist-custom-coverage-data-file

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 17, 2026

Copy link
Copy Markdown

Summary

When xdist workers run in non-collocated directories and coverage is configured with a custom [run] data_file, the master deserializes worker data into the default .coverage basename. Those worker files are then missed by the combiner, leaving the configured coverage database without the test lines.

Use the combiner configured data filename as the CoverageData basename when deserializing remote worker data. Extend the existing non-collocated regression across default and nested custom filenames, for both line and branch coverage. Add changelog and author credit.

Verification

  • On the unchanged base, four custom-filename cases failed while four default-filename controls passed.
  • Final isolated local suite: 209 passed, 3 skipped, 1 deselected. The Celery/Redis/container integration case was excluded because its dependencies were not available locally.
  • Ruff check and format, package build, and strict Twine archive checks passed.
  • tox -e check passed with only taplo-lint skipped. Unskipped Taplo failed while decoding its online schema catalog; other hooks passed. The full tox matrix and Windows/PyPy runs were not performed locally.

AI assistance was used to prepare the patch, regression tests, and validation. I reviewed and approved the code fix before submission.

@ionelmc
ionelmc force-pushed the fix/xdist-custom-coverage-data-file branch from bf248c5 to aa3b382 Compare October 18, 2026 17:44
@ionelmc
ionelmc force-pushed the fix/xdist-custom-coverage-data-file branch from aa3b382 to 9346856 Compare October 18, 2026 21:49
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