pytest-dev / pytest-dev/pytest
API Question: Configure pytest without running it
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
Hi pytest team,
I am developing the ipytest package, which allows you to run pytest inside the notebook. Recently a question regarding the pytest API came up: is there some API to configure pytest without running it? I browsed the API docs but couldn't find an easy way and just wanted to make sure I did not overlook something. This issue is not breaking and hence resolving it is more a nice to have.
The motivation: a user reported the issue, that pytest.mark.parametrize gives misleading error messages. The root cause for this behavior (see detailed description here) seems to be that the mark generator behaves differently when pytest is configured. For ipytest, the tests are all defined before pytest is run (and configured). Therefore the error message of the mark generator is a little bit tricky to parse.
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 pytest API documentation and the configuration lifecycle relevant to pytest.mark.parametrize. Read the linked ipytest issue 39 for the reported behavior, then determine whether a supported configuration-only entry point is needed. Done means a clear API decision and corresponding documentation or implementation scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100