Skip to content

add_marker with usefixtures no longer works with pytest 8.0.0 #11873

Open
@rhshadrach

Description

@rhshadrach

I believe this may be related to #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.

https://github.com/pandas-dev/pandas/blob/9008ee5810c09bc907b5fdc36fc3c1dff4a50c55/pandas/conftest.py#L191-L198

The add_doctest_imports fixture is here.

https://github.com/pandas-dev/pandas/blob/9008ee5810c09bc907b5fdc36fc3c1dff4a50c55/pandas/conftest.py#L253-L259

With pytest 8.0.0, add_marker no longer has any effect. Is the intentional, and if so, is there an alternative?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: regressionindicates a problem that was introduced in a release which was working previously

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions