semvec/pypi-packages huggingface dataset:
flake8-pytest-fixtures 0.0.1
A flake extension that checks pytest fixtures
License: MIT
Requires Python: >=3.6
Keywords: flake8

# flake8-pytest-fixtures

[![Build Status](https://travis-ci.com/webcrw101/flake8-pytest-fixtures.svg?branch=main)](https://travis-ci.org/webcrw101/flake8-pytest-fixtures)
[![Maintainability](https://api.codeclimate.com/v1/badges/f85c1fd2ad4af63d93b6/maintainability)](https://codeclimate.com/github/webcrw101/flake8-pytest-fixtures/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/f85c1fd2ad4af63d93b6/test_coverage)](https://codeclimate.com/github/webcrw101/flake8-pytest-fixtures/test_coverage)
[![PyPI version](https://badge.fury.io/py/flake8-pytest-fixtures.svg?)](https://badge.fury.io/py/flake8-pytest-fixtures)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/flake8-pytest-fixtures)

A flake extension that checks pytest fixtures

## Installation

```terminal
pip install flake8-pytest-fixtures
```

## Usage:

```terminal
$ 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](docs/codes/PF001.md)   | fixture `factories` must be suffixed with "_factory" |
|   [PF002](docs/codes/PF002.md)   | fixtures unused in test function body must be specified via a `@pytest.mark.usefixtures(...)` |


## TODO
* Add python3.6 and python3.7 support (there are some issues related to ast module)