A test case that wraps a test function.
This is useful for slipping pre-existing test functions into the
PyUnit framework. Optionally, set-up and tidy-up functions can be
supplied. As with TestCase, the tidy-up (tearDown
) function will
always be called if the set-up (setUp
) function ran successfully.
There are no implemented interfaces.
failureException
(type: classobj
)
<class exceptions.AssertionError at 0x403a18cc>
assertAlmostEqual(first, second, places=7, msg=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.
Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).
assertAlmostEquals(first, second, places=7, msg=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.
Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).
assertEqual(first, second, msg=None)
Fail if the two objects are unequal as determined by the ==
operator.
assertEquals(first, second, msg=None)
Fail if the two objects are unequal as determined by the ==
operator.
assertFalse(expr, msg=None)
Fail the test if the expression is true.
assertNotAlmostEqual(first, second, places=7, msg=None)
Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).
assertNotAlmostEquals(first, second, places=7, msg=None)
Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).
assertNotEqual(first, second, msg=None)
Fail if the two objects are equal as determined by the ==
operator.
assertNotEquals(first, second, msg=None)
Fail if the two objects are equal as determined by the ==
operator.
assertRaises(excClass, callableObj, *args, **kwargs)
Fail unless an exception of class excClass is thrown by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is thrown, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception.
assertTrue(expr, msg=None)
Fail the test unless the expression is true.
assert_(expr, msg=None)
Fail the test unless the expression is true.
countTestCases()
debug()
Run the test without collecting errors in a TestResult
defaultTestResult()
fail(msg=None)
Fail immediately, with the given message.
failIf(expr, msg=None)
Fail the test if the expression is true.
failIfAlmostEqual(first, second, places=7, msg=None)
Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).
failIfEqual(first, second, msg=None)
Fail if the two objects are equal as determined by the ==
operator.
failUnless(expr, msg=None)
Fail the test unless the expression is true.
failUnlessAlmostEqual(first, second, places=7, msg=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.
Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).
failUnlessEqual(first, second, msg=None)
Fail if the two objects are unequal as determined by the ==
operator.
failUnlessRaises(excClass, callableObj, *args, **kwargs)
Fail unless an exception of class excClass is thrown by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is thrown, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception.
id()
run(result=None)
runTest()
setUp()
shortDescription()
tearDown()
There are no known subclasses.