Skip to content

fix: keep pytest_terminal_summary under --no-summary#14730

Open
l46983284-cpu wants to merge 2 commits into
pytest-dev:mainfrom
l46983284-cpu:fix/no-summary-keep-terminal-hook-14724
Open

fix: keep pytest_terminal_summary under --no-summary#14730
l46983284-cpu wants to merge 2 commits into
pytest-dev:mainfrom
l46983284-cpu:fix/no-summary-keep-terminal-hook-14724

Conversation

@l46983284-cpu

@l46983284-cpu l46983284-cpu commented Jul 19, 2026

Copy link
Copy Markdown

Summary

--no-summary currently skips calling the pytest_terminal_summary hook entirely, which silences third-party plugins (e.g. pytest-cov) as well as pytest's own FAILURES/ERRORS sections.

This change always invokes the hook, but gates TerminalReporter's built-in summary sections on not no_summary, so:

  • pytest's own FAILURES/ERRORS/... stay hidden under --no-summary
  • plugins can still write their terminal summaries

Closes #14724

AI / review

I used automated assistance while preparing this change, then reviewed and tested the result myself. The product unit is the hook vs TerminalReporter split above; I can answer review questions on it.

Test plan

  • TestTerminalFunctional::test_no_summary (FAILURES still suppressed)
  • new test_no_summary_still_runs_terminal_summary_hook
  • existing no_summary warning/collecterror tests

@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Jul 19, 2026
l46983284-cpu and others added 2 commits July 23, 2026 11:11
--no-summary was skipping the entire pytest_terminal_summary hook, which
silenced third-party plugins (e.g. coverage) as well as pytest's own
FAILURES/ERRORS sections. Still suppress TerminalReporter's built-in
summary body, but always call the hook so plugins can report.

Closes pytest-dev#14724

Signed-off-by: Alex Chen <l46983284@gmail.com>
@nicoddemus
nicoddemus force-pushed the fix/no-summary-keep-terminal-hook-14724 branch from a63d1aa to 92d8c78 Compare July 23, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--no-summary disables the pytest_terminal_summary hook, silencing third-party plugins as well as pytest's own summary

2 participants