nose: nose.failure

Classes

Highlighted methods are defined in this class.

Failure (unittest.TestCase)

Methods

__call__(self, *args, **kwds)(inherited from TestCase)
__init__(self, exc_class, exc_val, tb=None)
_exc_info(self)(inherited from TestCase)

Return a version of sys.exc_info() with the traceback frame minimised; usually the top level of the traceback frame is not needed.

assertAlmostEqual(self, first, second, places=7, msg=None)(inherited from TestCase)

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(self, first, second, places=7, msg=None)(inherited from TestCase)

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(self, first, second, msg=None)(inherited from TestCase)

Fail if the two objects are unequal as determined by the '==' operator.

assertEquals(self, first, second, msg=None)(inherited from TestCase)

Fail if the two objects are unequal as determined by the '==' operator.

assertFalse(self, expr, msg=None)(inherited from TestCase)

Fail the test if the expression is true.

assertNotAlmostEqual(self, first, second, places=7, msg=None)(inherited from TestCase)

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(self, first, second, places=7, msg=None)(inherited from TestCase)

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(self, first, second, msg=None)(inherited from TestCase)

Fail if the two objects are equal as determined by the '==' operator.

assertNotEquals(self, first, second, msg=None)(inherited from TestCase)

Fail if the two objects are equal as determined by the '==' operator.

assertRaises(self, excClass, callableObj, *args, **kwargs)(inherited from TestCase)

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(self, expr, msg=None)(inherited from TestCase)

Fail the test unless the expression is true.

assert_(self, expr, msg=None)(inherited from TestCase)

Fail the test unless the expression is true.

countTestCases(self)(inherited from TestCase)
debug(self)(inherited from TestCase)

Run the test without collecting errors in a TestResult

defaultTestResult(self)(inherited from TestCase)
fail(self, msg=None)(inherited from TestCase)

Fail immediately, with the given message.

failIf(self, expr, msg=None)(inherited from TestCase)

Fail the test if the expression is true.

failIfAlmostEqual(self, first, second, places=7, msg=None)(inherited from TestCase)

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(self, first, second, msg=None)(inherited from TestCase)

Fail if the two objects are equal as determined by the '==' operator.

failUnless(self, expr, msg=None)(inherited from TestCase)

Fail the test unless the expression is true.

failUnlessAlmostEqual(self, first, second, places=7, msg=None)(inherited from TestCase)

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(self, first, second, msg=None)(inherited from TestCase)

Fail if the two objects are unequal as determined by the '==' operator.

failUnlessRaises(self, excClass, callableObj, *args, **kwargs)(inherited from TestCase)

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(self)(inherited from TestCase)
run(self, result=None)(inherited from TestCase)
runTest(self)
setUp(self)(inherited from TestCase)

Hook method for setting up the test fixture before exercising it.

shortDescription(self)(inherited from TestCase)

Returns a one-line description of the test, or None if no description has been provided.

The default implementation of this method returns the first line of the specified test method's docstring.

tearDown(self)(inherited from TestCase)

Hook method for deconstructing the test fixture after testing it.