Skip to content

sidorov-as/flake8-pytest-fixtures-style

Repository files navigation

flake8-pytest-fixtures-style

Build Status Maintainability Test Coverage PyPI version PyPI - Python Version

A flake8 extension that checks pytest fixtures.

Installation

pip install flake8-pytest-fixtures-style

Usage

$ flake8 text.py
text.py:2:5: PF001: pytest fixture "your_func_name" returning another fixture must be suffixed with "_factory"

Error codes

Error code Description
PF001 fixture factories must be suffixed with "_factory"
PF002 fixtures unused in test function body must be specified via a @pytest.mark.usefixtures(...)