Package gavo :: Package helpers :: Module testhelpers :: Class SimpleSampleComparisonTest
[frames] | no frames]

Class SimpleSampleComparisonTest

source code

                 object --+            
                          |            
     unittest.case.TestCase --+        
                              |        
testresources.ResourcedTestCase --+    
                                  |    
                        VerboseTest --+
                                      |
                                     SimpleSampleComparisonTest

A base class for tests that simply run a function and compare for equality.

The function to be called is in the functionToRun attribute (wrap it in a staticmethod).

The samples are pairs of (input, output). Output may be an exception (or just the serialised form of the exception).

Nested Classes
  __metaclass__
A metaclass that builds tests out of a samples attribute of a class.

Inherited from unittest.case.TestCase: failureException

Instance Methods

Inherited from VerboseTest: assertAlmostEqualVector, assertEqualForArgs, assertEqualIgnoringAliases, assertEqualToWithin, assertOutput, assertRaisesVerbose, assertRaisesWithMsg, assertRuns

Inherited from testresources.ResourcedTestCase: setUp, setUpResources, tearDown, tearDownResources

Inherited from unittest.case.TestCase: __call__, __eq__, __hash__, __init__, __ne__, __providedBy__, __provides__, __repr__, __str__, addCleanup, addTypeEqualityFunc, assertAlmostEqual, 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

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

Class Methods

Inherited from unittest.case.TestCase: setUpClass, tearDownClass

Class Variables

Inherited from testresources.ResourcedTestCase: resources

Inherited from unittest.case.TestCase: __implemented__, longMessage, maxDiff

Properties

Inherited from object: __class__