pytest-dev / pytest-dev/pytest
documentation contradiction: pytest_load_initial_conftests
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
I think there is a contradiction between this example page in the documentation and the reference of pytest_load_initial_conftests.
https://docs.pytest.org/en/latest/example/simple.html#dynamically-adding-command-line-options
https://docs.pytest.org/en/latest/reference.html#_pytest.hookspec.pytest_load_initial_conftests
The examples page suggests that it can be used to " dynamically modify the command line arguments ". But the reference says This hook will not be called for conftest.py files, only for setuptools plugins.
The examples page doesn't mention anything about setuptools plugins and it gives the impression that it can be used from conftest files, like other examples from the same page.
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
Compare the dynamically-adding-command-line-options example in example/simple.html with the pytest_load_initial_conftests reference in reference.html. Verify the hook's documented scope, then align the two pages so the example clearly states the applicable plugin context and no longer contradicts the reference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation, testing-qa
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100