← Quiz: Testing Python Code: all 10 questions
Quiz: Testing Python Code · Question 7 of 10
What does @pytest.mark.parametrize do?
What does @pytest.mark.parametrize do?
- A.Makes a test run faster
- B.Skips a test
- C.Turns a test into a unittest class
- D.Runs the same test function once for each set of given values
Answer & explanation
Correct answer: Runs the same test function once for each set of given values
One function can check many inputs and expected outputs.
Can you get the rest right without peeking?
Take the timed Quiz: Testing Python Code quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →