Parameterized pytest cases
One table, every boundary
@pytest.mark.parametrize("value, expected", [...]) runs one test per row. That makes gaps visible: for an inclusive range, put the values just below, on and just above each limit in the same table. Write the expected column by hand. Computing it with the function you are testing copies its bug into the test.
Names that explain a failure
pytest.param(..., id="upper-limit") gives a case a name pytest prints when it fails, so a broken rule is easy to find. The parametrize guide covers stacking and indirect parameters. The lesson’s tasks cover an age range, a status policy that uses exact tokens, Decimal half-up rounding and identifier normalization where an empty string is a valid result. Each test module you write is checked against a correct implementation and two faulty ones.