Skip to content

Support pytest test discovery in monorepo setup with multipe tests/conftest.py #25069

Open
@atinary-bvollmer

Description

@atinary-bvollmer

I'm currently working in a python monorepo setup where we have multiple libraries and projects. They each have their own tests folders.

The problem I'm facing is that the test discovery of VSCode fails due to an ImportPathMismatchError error as pytest does not allow for multiple tests/conftest.py path to be used.

The cleanest solution I found so far is to rename the tests folders to NAME_tests to avoid the duplication but it does feel weird and hacky.

Fixing this would help further making VSCode a tool that works well in a monorepo setup.

Metadata

Metadata

Assignees

Labels

area-testingfeature-requestRequest for new features or functionalitytriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions