pytest-dev / pytest-dev/pytest
mypy plugin to ignore type-checking errors with pytest.raises
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
When writing tests for error cases using with pytest.raises(...), the code within the body will always generate a mypy error which must be ignored (if a project has sufficient static typing).
It would be great if pytest included a mypy plugin which can suppress the errors in these cases.
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 by reviewing the linked aiohttp-session test example and the requested pytest.raises behavior. Determine the integration points needed for a mypy plugin, and consider the work done when errors inside pytest.raises blocks are suppressed without hiding unrelated type-checking errors.
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
- 30/100