Skip to content

IncrementalPlugin does not use norecursedirs and --ignore options? #9

Open
@jneeven

Description

@jneeven

Hi! This looks like an awesome package so I've been trying to get it running, but whenever I run pytest it now gets stuck forever. I've printed the trace and added some print statements, and it appears that the IncrementalPlugin ignores the norecursedirs option of my pytest config, which results in it trying to parse my entire virtual environment stored in the same folder...

The problem seems to be with this part of the code:
https://github.com/pytest-dev/pytest-incremental/blob/master/pytest_incremental.py#L577

Since I have no explicit watch path set (I want to process all files except those I explicitly ignore, such as my virtual environment), it just defaults to os.getcwd(). Is this a deliberate choice? I'm not sure how exactly pytest uses the norecursedirs option internally, but it does work correctly in the sense that if I disable pytest-incremental, it does indeed skip those folders. The same is true for the --ignore command line option.

I assume having a virtual environment in the same folder is a pretty common thing to do, so perhaps I'm missing something or doing something wrong? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions