pytest-dev / pytest-dev/pytest
[FR] Support for env-dependent `filterwarnings` entries
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
For example, if I want to add ignore for the deprecation warning that only happens on Python 3.5 and POSIX, I want some entries to only apply to that. The example pseudosyntax:
filterwarnings =
error
ignore::DeprecationWarning; python_version == '3.5' and sys_platform != 'Windows'
(that is completely made up after the env markers but hopefully, you've got the idea)
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
No files, tests, or entry points are named. Start by reviewing pytest's existing filterwarnings configuration handling and how environment markers are represented elsewhere; define the supported syntax and its behavior across Python versions and platforms. Done means conditional filterwarnings entries work for the proposed Python and POSIX case, with coverage for the agreed syntax.
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
- Mostly clear
- Newbie friendliness
- 35/100