A flake8 extension that checks pytest fixtures.
pip install flake8-pytest-fixtures-style
$ flake8 text.py
text.py:2:5: PF001: pytest fixture "your_func_name" returning another fixture must be suffixed with "_factory"
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(...) |