← 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?
- A.Every method in the class
- B.Methods whose names start with test
- C.Only the setUp method
- 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 →