node ID

The full address pytest gives each test, made of the file path, two colons and the test name, such as test_discount.py::test_a_silly_percentage_is_refused.

In more detail

Verbose output prints one per test, and pasting it back onto the command line runs just that test. Parametrized cases add their case ID in square brackets, so quote the node ID in the shell.

Example

pytest "test_discount.py::test_a_tenth_off[half-penny]"

Related terms

Taught in

References