Skip to content

Documentation: Needs to be updated to reflect how --confcutdir works since 7.4.0 #12857

Open
@sdondley

Description

@sdondley

I have 7.2.2 of pytest installed. With a conftest installed in each dir above where I'm running tests, I see:

> $ pytest --version                                                                                             
pytest 7.2.2
CONFTEST ../../ LOADED
CONFTEST .. LOADED
CONFTEST . LOADED

But with 8.3.3 run from the same directory:

(test_env) > $ pytest --version                                                                         [±main ●]
CONFTEST . LOADED

With 8.3.3, only the conftest in the current directory is loaded unless I explicitly set --confcutdir.

This is the result of change #11043. See https://docs.pytest.org/en/latest/changelog.html#id213 for more details.

This was a source of great frustration and confusion. It took me a while to figure out especially since I'm new python. The docs here need to be updated to reflect this important change in behavior:

https://docs.pytest.org/en/stable/how-to/writing_plugins.html#plugin-discovery-order-at-tool-startup

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: docsdocumentation improvement, missing or needing clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions