pytest-dev / pytest-dev/pytest
add_marker with usefixtures no longer works with pytest 8.0.0
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
I believe this may be related to https://github.com/pytest-dev/pytest/issues/3664.
In pandas, we dynamically add a marker for our doctests so that we don't need import pandas as pd and import numpy as np in every docstring.
The add_doctest_imports fixture is here.
With pytest 8.0.0, add_marker no longer has any effect. Is the intentional, and if so, is there an alternative?
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 by reading the linked pandas/conftest.py sections around lines 191-198 and 253-259, especially the add_doctest_imports fixture, then reproduce the behavior with pytest 8.0.0. Compare how add_marker is applied before and after that release; done means restoring the doctest marker behavior or documenting a verified alternative.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100