Skip to content

Support generating summary reports when using pytest-xdist #242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ConorMacBride
Copy link
Member

@ConorMacBride ConorMacBride commented Jun 30, 2025

  • When mpl-results-path is not set, ensure temp directory is shared across all workers
  • When in a worker:
    • Write JSON summaries to {results_dir}/results-xdist-{test_run_uid}-{worker_id}.json
    • Skip generating HTML reports
  • When in the controller:
    • Read all JSON summaries {results_dir}/results-xdist-{test_run_uid}-*.json back into current controller process
    • Write merged JSON summaries back to {results_dir}/results.json
    • Generate HTML reports as usual

This likely won't work for remote xdist workers. Maybe we need a way to detect that and warn?

TODO

  • Merge generated hash libraries together also (and test)

Closes #136
Closes #239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue to generate correctly html repport while using xdist options pytest-xdist incompatible with generating files
1 participant