# pytest

> pytest suites: test style rules, test-name prefixes, and a coverage floor before every push.

pytest suites: test style rules, test-name prefixes, and a coverage floor before every push. It requires [`python`](/reference/configurations/python/). The [Tests and coverage guide](/checks/testing/) explains the setup.

## Checks

| Check                                                   | Stage  | Level         | What it does                                                                              |
| ------------------------------------------------------- | ------ | ------------- | ----------------------------------------------------------------------------------------- |
| [`pytest/coverage`](/reference/checks/pytest/coverage/) | `push` | `recommended` | Runs pytest with coverage, and fails on a broken test or a covered share under the floor. |

## Settings

| Setting                                                             | What it sets                                                  |
| ------------------------------------------------------------------- | ------------------------------------------------------------- |
| [`coverage.lines`](/reference/gspot-toml/#coverage.lines)           | The minimum percentage of source lines covered by tests.      |
| [`coverage.branches`](/reference/gspot-toml/#coverage.branches)     | The minimum percentage of source branches covered by tests.   |
| [`coverage.functions`](/reference/gspot-toml/#coverage.functions)   | The minimum percentage of source functions covered by tests.  |
| [`coverage.statements`](/reference/gspot-toml/#coverage.statements) | The minimum percentage of source statements covered by tests. |

## Selected when

gspot selects it in a scope with filenames `conftest.py`, `pytest.ini`, or dependencies `pytest`.

## Tools and versions

| Tool       | Version |
| ---------- | ------- |
| pytest     | Any     |
| pytest-cov | Any     |
