First and foremost: excellent book!
On page 46 there is an example how to pass ids into a parametrize decorator, a task_ids was created for this. A more lazy solution is to pass repr as an ids as this argument can be a string or a callable:
@pytest.mark.parametrize(‘task’, tasks_to_try, ids=repr)
Result is pretty much similar:
test_add_variety.py::test_add_5[Task(summary=’sleep’, owner=None, done=True, id=None)] PASSED [ 20%]