Skip to content

pytest-incorrect-pytest-import (PT013)#

Derived from the flake8-pytest-style linter.

What it does#

Checks for incorrect import of pytest.

Why is this bad?#

pytest should be imported as import pytest and its members should be accessed in the form of for consistency and to make it easier for linting tools to analyze the code.


import pytest as pt
from pytest import fixture

Use instead:

import pytest