Package Biskit :: Module test :: Class BiskitTest
[hide private]
[frames] | no frames]

Class BiskitTest

source code


Base class for Biskit test cases.

BiskitTest adds some functionality over the standard unittest.TestCase:

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).

Instance Methods [hide private]
  prepare(self)
Hook for test setup.
  cleanUp(self)
Hook for post-test clean up; skipped if DEBUG==True.
  setUp(self)
  tearDown(self)

Class Variables [hide private]
  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

Method Details [hide private]

prepare(self)

source code 

Hook for test setup.

cleanUp(self)

source code 

Hook for post-test clean up; skipped if DEBUG==True.

setUp(self)

source code 

tearDown(self)

source code 

Class Variable Details [hide private]

TAGS


categories for which this test case qualifies (class-wide)
Value:
[NORMAL]                                                               
      

TESTLOG


System-wide test log
Value:
StdLog()                                                               
      

VERBOSITY


System-wide verbosity level
Value:
o ['v']                                                                
      

DEBUG


debug mode -- don't delete temporary data
Value:
o ['debug']