Skip to content

Conversation

@paul-ollis
Copy link
Contributor

Description

This PR prevents pytest_terminal_summary from executing in pytest-xdist worker processes.

I have seen this cause workers to use very high CPU (100% of a core or close) and cause a significant delay at the end of test runs (about 5 seconds).

I cannot see any reason why xdist worker should need to run the terminal summary, so simply preventing execution seems to be a sensible solution. Of course I may be wrong about this.

All tests appear to still pass. It is not obvious to me how to add a test for this change, but I do not think it is really necessary.

Related Issues

None.

Checklist

  • [ n/a] This PR has sufficient documentation.
  • This PR has sufficient test coverage.
  • [ x] This PR title satisfies semantic convention.

Additional Comments

No additional comments.

@codecov
Copy link

codecov bot commented Apr 30, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #978      +/-   ##
==========================================
- Coverage   97.38%   97.32%   -0.06%     
==========================================
  Files          21       21              
  Lines        1683     1685       +2     
==========================================
+ Hits         1639     1640       +1     
- Misses         44       45       +1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@noahnu noahnu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change makes sense to me. The controller prints the report.

@noahnu noahnu merged commit 33a848d into syrupy-project:main Apr 30, 2025
12 of 15 checks passed
@noahnu
Copy link
Collaborator

noahnu commented Apr 30, 2025

@all-contributors add @paul-ollis for bug

@allcontributors
Copy link
Contributor

@noahnu

I've put up a pull request to add @paul-ollis! 🎉

@noahnu
Copy link
Collaborator

noahnu commented Apr 30, 2025

The main branch has unreleased changes from v5 on it so I'll have to create a v4 backport branch to get your change out earlier. I'll take a look later this week.

@noahnu
Copy link
Collaborator

noahnu commented Sep 28, 2025

🎉 This PR is included in version 5.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants