Skip to content

Pytest 7.0.0 appears to break pytest-pythonpath python_paths in pytest.ini #9636

@bluetech

Description

@bluetech

Discussed in #9635

Originally posted by enewton February 7, 2022
We have some utility helper code in a separate folder to our tests. Up until now we have this configured via pytest.ini like so:

[pytest]
python_paths = ./utils/

This definition appears to be getting ignored after upgrading to pytest 7.0.0, which then gives us 'module not found' errors on tests trying to import utils. Reading around, it looks like this functionality is now built in to pytest and so is pytest-pythonpath obsolete?

I can get our tests passing again by updating to:

[pytest]
pythonpath = ./utils/

So the main question is, is this change in behaviour expected? Has the old method been deliberately disabled or should I raise a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugproblem that needs to be addressedtype: 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