Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Parametrize tests

There can be a lot of cases when we would like to run the same test-code with different input and different expected output values.

Earlier we created copies of the test functions, but that is not really the nice way to do it.

It requires us to think about a new name for each test function. It means a lot of code repetition.

Let’s see how to eliminate those problems.