...

/

Parameterized Tests Using pytest

Parameterized Tests Using pytest

Learn how to write parameterized tests using pytest.

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 ...