Skip to content

package conftest still imported when package is added to collect_ignore #4592

@copperchin

Description

@copperchin

I recently upgraded to pytest 4.0.2 (from 3.6.4) and am now seeing some changed behavior.

My top-level conftest.py would, under certain conditions, add a package name to the collect_ignore list.
This package also had a conftest.py, but with 3.6.4 the package's conftest would be ignored when the package was ignored.
Now with 4.0.2, the appropriate tests are ignored, but the conftest.py is no longer ignored.

I've attached a simple example to illustrate the behavior.
I'm running Python 2.7.6 (yes, I know, not by choice) on Windows 7.

pytestbug.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: collectionrelated to the collection phasetype: bugproblem that needs to be addressed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions