pytest-dev / pytest-dev/pytest

add tools for warning erroing and filtering to support different workflows

Open
#9,535 0 comments 1 reaction 0 assignees View on GitHub

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

  1. 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
  2. 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

  1. is the warning from own code or from a dependency/framework
  2. show a indication when warning filters did not trigger
  3. allow some extra indications in warning filters, if they only work in certain environments (perhaps environment markers)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.