Skip to content

Importing from tests.x #296

@kellerza

Description

@kellerza

I get this over most of my test infra.

from tests.conftest import MongoMockEnv
error: Cannot find implementation or library stub for module named "tests.conftest"  [import-not-found]

Tests is not a full module in pyproject

[tool.uv]
build-backend.module-name = ["mymodule"]

I tried to add a tests\py.typed. No luck

What seems to work is relative imports:

from ...conftest import MongoMockEnv

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions