Parameterized Tests Using pytest
Learn how to write parameterized tests using pytest.
We'll cover the following...
Running parameterized tests with pytest
is better, not only because it provides a cleaner API, but also because each combination of the test with its parameters generates a new test case (a new function).
Writing parameterized tests using pytest
To work with this, we have to use the pytest.mark.parametrize
decorator on our test. The first parameter of the decorator is a string indicating the ...