🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.Makes a test run faster
  2. B.Skips a test
  3. C.Turns a test into a unittest class
  4. 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 →