Package csb :: Package test :: Class Case
[frames] | no frames]

Class Case

source code

            object --+    
                     |    
unittest.case.TestCase --+
                         |
                        Case

Base class, defining a CSB Test Case. Provides a default implementation of unittest.TestCase.setUp which grabs a reference to a Config.

Nested Classes

Inherited from unittest.case.TestCase: failureException

Instance Methods
 
assertAlmostEqual(self, first, second, places=None, msg=None, delta=None)
Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.
source code
 
assertFasterThan(self, duration, callable, *args, **kargs)
Fail if it took more than duration seconds to invoke callable.
source code
 
reRaise(self, addArgs=())
Re-raise the last exception with its full traceback, but modify the argument list with addArgs and the original stack trace.
source code
 
setUp(self)
Provide a reference to the CSB Test Config in the self.config property.
source code

Inherited from unittest.case.TestCase: __call__, __eq__, __hash__, __init__, __ne__, __repr__, __str__, addCleanup, addTypeEqualityFunc, assertAlmostEquals, assertDictContainsSubset, assertDictEqual, assertEqual, assertEquals, assertFalse, assertGreater, assertGreaterEqual, assertIn, assertIs, assertIsInstance, assertIsNone, assertIsNot, assertIsNotNone, assertItemsEqual, assertLess, assertLessEqual, assertListEqual, assertMultiLineEqual, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertNotIn, assertNotIsInstance, assertNotRegexpMatches, assertRaises, assertRaisesRegexp, assertRegexpMatches, assertSequenceEqual, assertSetEqual, assertTrue, assertTupleEqual, assert_, countTestCases, debug, defaultTestResult, doCleanups, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, shortDescription, skipTest, tearDown

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods
 
execute(cls)
Run this test case.
source code

Inherited from unittest.case.TestCase: setUpClass, tearDownClass

Class Variables

Inherited from unittest.case.TestCase: longMessage, maxDiff

Properties
Config config
Test config instance

Inherited from object: __class__

Method Details

assertAlmostEqual(self, first, second, places=None, msg=None, delta=None)

source code 

Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.

Note that decimal places (from zero) are usually not the same as significant digits (measured from the most significant digit).

If the two objects compare equal then they will automatically compare almost equal.

Overrides: unittest.case.TestCase.assertAlmostEquals
(inherited documentation)

assertFasterThan(self, duration, callable, *args, **kargs)

source code 

Fail if it took more than duration seconds to invoke callable.

Parameters:
  • duration (float) - maximum amount of seconds allowed

reRaise(self, addArgs=())

source code 

Re-raise the last exception with its full traceback, but modify the argument list with addArgs and the original stack trace.

Parameters:
  • addArgs (tuple) - additional arguments to append to the exception

setUp(self)

source code 

Provide a reference to the CSB Test Config in the self.config property.

Overrides: unittest.case.TestCase.setUp

Property Details

config

Test config instance

Get Method:
unreachable.config(self) - Test config instance
Type:
Config