Examples in the doc should not rely on test tasks
Best to me to decouple test cases from the doc.
Sounds risky to me to mix doc and tests. It's easy to update the test case and not change the lines here... Duplicating it also avoids the line selection
Also, I would suggest to use a "real world" example (tasks from the trainings?) rather than test dummies and use it for the different cases.