test naming

Choosing test function names that state the behaviour and the condition, so a failure summary reads as a sentence.

In more detail

A useful shape is subject, then behaviour, then condition, as in test_a_full_discount_makes_the_price_zero. Numbered names such as test_discount2 tell a reader nothing. Domain words in names also make the suite selectable with -k.

Related terms

Taught in

References