Skip to content

Add option to disable short summary truncation - #15269

Open
Thibault-dlr wants to merge 1 commit into
pytest-dev:mainfrom
Thibault-dlr:fix-10264-summary-truncation
Open

Thibault-dlr wants to merge 1 commit into
pytest-dev:mainfrom
Thibault-dlr:fix-10264-summary-truncation

Conversation

@Thibault-dlr

Copy link
Copy Markdown

Summary

This PR adds a --no-truncate-summary command-line option to pytest.

The option allows users to display complete first lines of messages in the short test summary without truncating them to the terminal width. It does not change the global verbosity level or affect other output.

The existing --force-short-summary option takes precedence when both options are specified.

Tests

  • Added tests for the default truncation behavior.
  • Added tests for --no-truncate-summary, including CI and non-CI environments.
  • Tested the interaction with --force-short-summary.
  • Added coverage for multiline messages to ensure that only the first line appears in the summary.

Validation

  • .\.venv313\Scripts\python.exe -m pytest testing\test_terminal.py — 238 passed, 9 skipped.
  • .\.venv313\Scripts\python.exe -m pytest testing\code\test_excinfo.py -k exceptiongroup_short_summary_info — 1 passed, 200 deselected.
  • Relevant pre-commit hooks passed.
  • git diff --check passed.

Closes #10264

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Oct 27, 2026

This branch has not been deployed

No deployments
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.

Provide dedicated control over truncation of "short test summary info" lines

2 participants