marker

A label attached to a test with @pytest.mark.name so you can select, skip or configure tests by that label.

In more detail

Register custom markers in the configuration file with a one-line description; with --strict-markers a misspelt marker then becomes an error instead of a label nobody selects. pytest -m "not slow" runs everything except the slow tests, which is the fast set to run on every save.

Example

pytest -q -m "not slow"

Related terms

Taught in

References