pytest -k

The pytest option that runs only tests whose names match a substring or a small expression using and, or and not.

In more detail

Good test names make it powerful: pytest -k full_discount runs everything about full discounts. Tests that do not match are reported as deselected, not as skipped or passed.

Example

pytest -q -k full_discount

Related terms

Taught in

References