Skip to content

mypy can't discover pytest.lazy_fixture under pytest 6 #51

@freakboy3742

Description

@freakboy3742

If you have a test suite that uses pytest.lazy_fixture, and you're using pytest 6.0.0+, and you run mypy over your test suite, mypy complains with the error:

test/test_something.py:42: error: Module has no attribute "lazy_fixture"

The test suite itself passes without any problems; it is only the type checking of mypy that fails.

This problem does not exist on pytest 5.4.3 or earlier.

I presume something has changed in the plugin registration process that prevents mypy from seeing the lazy_fixture attribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions