Skip to content

pytest_sessionstart not run in custom test directories #10987

@padix-key

Description

@padix-key

When using a custom test directory, other than tests/ the pytest_sessionstart hook (or the maybe also the entire conftest.py) is not run. The issue appeared at pytest version 7.3.1 under Windows 10.

I created a minimum working example that shows the problem at https://github.com/padix-key/pytest-issue. When the tests folder some_path is renamed to tests pytest_sessionstart()` is sucessfully run, indicated by the raised Exception. Otherwise it is not run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions