pytest-dev / pytest-dev/pytest
Provide better message when pytest receives invalid filter with `-W`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
Your -ArgumentList $myparams -Wait -PassThru causes -Wait to be passed to pytest - that in turn passes it to Python's warnings module as an ait warning filter, which isn't valid.
I suppose pytest could show a better error message in this case though.
Originally posted by @The-Compiler in https://github.com/pytest-dev/pytest/issues/8095#issuecomment-737862151
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 file or test is named in the issue. Start by reproducing pytest with an invalid warning filter passed through -W, then trace the command-line warning-filter error path; done means pytest reports a clearer error for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100