Skip to content

Cannot resolve imported module conftest in tests #414

@MatthewMckee4

Description

@MatthewMckee4

Summary

I'm maybe not sure how to best class this error, but when using pytest its obviously quite common to import from conftest.py in a test file, in the root or any subdirectory directory of the tests directory.

in a test file like tests/test_foo.py

from conftest import ... # error[unresolved-import]: Cannot resolve imported module `conftest`

we see this error.

I am aware that this code (and practice) is not ideal. But i imagine many users may have this issue when type checking tests directory.

Also, perhaps this is not a bug, but I think something useful to think about

Version

0.0.0-alpha.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedContributions especially welcomeimportsModule resolution, site-packages discovery, import-related diagnostics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions