Class BiskitTest
source code
Base class for Biskit test cases.
BiskitTest adds some functionality over the standard
unittest.TestCase
:
-
self.local reflects whether the Test is performed in the __main__
scope of the module it belongs to -- or as part of the whole test
suite.
-
Each test case can be classified by assigning flags to its static
TAGS field -- this will be used by the test runner to filter out,
e.g. very long tests or tests that require PVM.
-
self.log should capture all the output, by default it goes to the
TESTLOG instance defined at the module level.
Usage:
Biskit test cases should be created by sub-classing BiskitTest and
by adding one or more test_* methods (each method starting with 'test_'
is treated as a separate test). The doc string of a test_* method
becomes the id reported by the TextTestRunner.
prepare should be overriden for the definition of
permanent input and temporary output files. cleanUp should be overriden for clean up actions and
to remove temporary files (use Biskit.tools.tryRemove). cleanUp is not called if BiskitTest is set into
debugging mode (see BiskitTest.DEBUG).
The TAGS field should be overriden to reflect any special
categories of the test case (LONG, PVM, EXE or OLD).
|
TAGS = [NORMAL]
categories for which this test case qualifies (class-wide)
|
|
TESTLOG = StdLog()
System-wide test log
|
|
VERBOSITY = o ['v']
System-wide verbosity level
|
|
DEBUG = o ['debug']
debug mode -- don't delete temporary data
|
Hook for post-test clean up; skipped if DEBUG==True.
-
|
TAGS
categories for which this test case qualifies (class-wide)
-
- Value:
|
TESTLOG
System-wide test log
-
- Value:
|
VERBOSITY
System-wide verbosity level
-
- Value:
|
DEBUG
debug mode -- don't delete temporary data
-
- Value:
|