Using the unittest module
Which unittest module should I use for tests in the application?
The Problem: When developing unit-tests for the application, there is several modules to use. Currently there are the options: unittest (from python), coilib50.unittest, xgui20.unittest and sci20.unittest. Which one should we use and how to use them?
The Solution:
- Always use ONLY the module of the higher level library.
- Import the module using the syntax:
from XXX import unittest
- Inside the code, use the
unittest.prefix for all unittest symbols
Remarks:
- All unittest module have
mainand all unittest related symbols defined. This means that the unittest module forsci20, for example, also have the lower level symbols such asTestCase,GUITestCaseandmain




Leave a comment