pytest-dev / pytest-dev/pytest
Allow disabling of additive options
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
Best I can tell, there's no way to suppress the running of doctests. If --doctest-modules is indicated in the pytest.ini (or similar), the only way to disable those tests for a particular run is to edit the file to remove that option (and then of course remember later to undo that change before making other commits to the code).
Better would be for all opt-in options such as --doctest-modules to have an equivalent opt-out option to override the setting from a broader scope, allowing a command-line invocation to supersede the standard test process.
I could imagine a few ways this could be accomplished, but unless prompted, I'll defer to the sensibilities of the maintainers as to how this should be accomplished in pytest.
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
Begin by reviewing how --doctest-modules from pytest.ini is parsed and applied during a command-line run. No source files or tests are named, so clarify the override semantics with maintainers first; done should mean a command-line option can suppress configured doctests without editing pytest.ini, with coverage for that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100