pytest-dev / pytest-dev/pytest
add tools for warning erroing and filtering to support different workflows
Open
Nobody has claimed this yet.
type: enhancement
type: proposal
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
based off @davidism on this twitter thread
we need 2 utilities
- a flag to allow to fail a test phase at its end when it had warnings/specific warnings
(just setting warnings to error simply fails at the first one and may hide more behind a bad feedback loop)
this could possibly be a extra report so its clear a test was "fine" however had warnings - add a helper to suggest warning filters for example when a new python version has new ones
(context of the the threat was new warnings on python 3.10
on top of that it would be nice to have certain extra tools to determine
- is the warning from own code or from a dependency/framework
- show a indication when warning filters did not trigger
- allow some extra indications in warning filters, if they only work in certain environments (perhaps environment markers)
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
The issue does not name files or tests. Start by reviewing pytest's existing warning handling and warning-filter configuration, then define the scope for end-of-phase warning failures, filter suggestions, source detection, unused-filter indications, and environment-specific filters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100