Add more examples in the `warnings` docs
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 36k
- PR merge metrics
- PR metrics pending
Description
This is a follow-up of GH-86438 and GH-23172. The warnings docs should include more examples to show how to match different types of warnings using both the provided functions and -W/PYTHONWARNINGS, especially since they behave differently.
At the bottom of https://github.com/pytest-dev/pytest/discussions/8759#discussioncomment-2818984 there are already some examples to illustrate some of the differences, even though some are specific to pytest.
Linked PRs
- gh-106618
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 the warnings documentation and review the examples at the linked pytest discussion, comparing the provided functions with -W and PYTHONWARNINGS. Done means the docs include examples for matching different warning types and clearly explain where these approaches behave differently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100