Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What method do you use to check if two values are equal in unittest?
Think of equality checking.
What is the purpose of the setUp() method?
Preparation before testing.
What is a test case in unittest?
Think about the structure of your tests.
True or False: The tearDown() method is called before each test.
Consider when cleaning occurs in the testing cycle.
Write a unit test for a function named multiply(a, b) that returns the multiplication of a and b. Your test should check for normal cases as well as zero and negative cases.
Remember to include different scenarios in your test.
Discuss the implications of not using tearDown() in your tests. How could it lead to issues?
Think about how tests could influence one another.
5 more questions in this section. Enroll free to practise them all.
Enroll free