Ref. from : https://pymotw.com/2/unittest/
unittest is a testing framework for Python. It supports :
1. Test automation
2. Sharing of setup and shutdown code for tests
3. Aggregation of tests into collections
4. Independence of tests from the reporting framework
To implement the above mentioned functionalities, it supports some OOP based concepts:
- test fixture : It is something like initializing and loading all variables(everything needed) before running the real logic for testing.
- test case : Here we generally hard code responses for particular critical test cases.
- test suite : It’s a collection of various test cases and test suites.
- test runner : It decides the execution order during testing, interface for the user and format of output to be generated after the testing is completed.