Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is unit testing?
Think about how each part of the code works on its own.
What does the unittest module provide?
Consider what tools you might need to run and organize your tests.
What is the purpose of unit testing?
Think about all the benefits of catching bugs early.
True or False: The unittest module is a part of Python’s standard library.
Recall what is included by default in Python.
Create a more complex set of unit tests for a function that processes data (e.g., filtering a list based on certain criteria). Include both setup and teardown methods.
Use assertions to verify the output of your data processing function.
Write a test suite for multiple test cases of a class that represents a bank account, ensuring the account operates correctly with deposits and withdraws.
Make sure to check the balance after each operation.
6 more questions in this section. Enroll free to practise them all.
Enroll free