🎙 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 3 of 10

In unittest, which methods of a TestCase class are run as tests?

In unittest, which methods of a TestCase class are run as tests?

  1. A.Every method in the class
  2. B.Methods whose names start with test
  3. C.Only the setUp method
  4. D.Methods marked with @test
Answer & explanation

Correct answer: Methods whose names start with test

A method named check_total would be silently skipped.

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 →