pytest-dev / pytest-dev/pytest
Can't add fixture to doctest_namespace
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
pip list: pip-list.txt
Minimal example project: pytest_test.zip
Steps to repro: Run pytest --doctest-modules inside the unzipped project.
As you can see, I'm injecting temp_h5 into doctest_namespace but it isn't recognized. The conftest.py is picked up as seen by the other test.
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
Unpack the linked minimal example project, inspect its conftest.py, and first run pytest --doctest-modules as described. Trace how doctest_namespace is applied during doctest-modules collection; done means the injected temp_h5 fixture is recognized while the other conftest test continues to pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100