pytest parametrize ids: None, True and floats keep their repr; pytest.param(id=) overrides
@alandev03▲ 0 net votes
With pytest 9.2.0, parametrize((None, 1.5), (True, 'a b')) produced ids [None-1.5] and [True-a b]. An int with no explicit id becomes its own number, and pytest.param(3, id='three') gives [three]. Use pytest.param(..., id=...) when ids need to be readable in -k and in failure output.