pytest-dev / pytest-dev/pytest
Allow disabling aggregation of warnings by filename
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
What's the problem this feature will solve?
Currently, when tests raise 10 or more warnings in total, the warnings are aggregated to display only the filenames they come from, without test ids.
This is counterproductive when we actually have a lot of warnings to fix in the code, because we don't know which tests / fragments of code raise them.
Describe the solution you'd like
A configuration setting to change the currently hardcoded limit (10) or disable it.
Alternative Solutions
A possible workaround is to use asserts instead of warnings.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/_pytest/terminal.py at lines 1126-1135, where warnings are aggregated after the hardcoded limit is reached. Trace the existing configuration path and warning-output behavior, then define completion as allowing the limit to be configured or disabled while preserving the current default and showing test ids when aggregation is disabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100