Assign IDs to Test Cases

pytest parametrize allows you to test your function with different examples. When using pytest parametrize, it can be difficult to understand the role of each test case.

You can add id to each test case using pytest.param for clearer outputs.

My previous tips on testing.

Scroll to Top

Work with Khuyen Tran

Work with Khuyen Tran