| |
- Method resolution order:
- Test
- unittest.TestCase
- builtins.object
Methods defined here:
- setUp(self)
- tearDown(self)
- test_passing(self)
- test_scrolling(self)
Methods inherited from unittest.TestCase:
- __call__(self, *args, **kwds)
- __eq__(self, other)
- __hash__(self)
- __init__(self, methodName='runTest')
- Create an instance of the class that will use the named test
method when executed. Raises a ValueError if the instance does
not have a method with the specified name.
- __ne__(self, other)
- __repr__(self)
- __str__(self)
- addCleanup(self, function, *args, **kwargs)
- Add a function, with arguments, to be called when the test is
completed. Functions added are called on a LIFO basis and are
called after tearDown on test failure or success.
Cleanup items are called even if setUp fails (unlike tearDown).
- addTypeEqualityFunc(self, typeobj, function)
- Add a type specific assertEqual style function to compare a type.
This method is for use by TestCase subclasses that need to register
their own type equality functions to provide nicer error messages.
Args:
typeobj: The data type to call this function on when both values
are of the same type in assertEqual().
function: The callable taking two arguments and an optional
msg= argument that raises self.failureException with a
useful error message when the two arguments are not equal.
- assertAlmostEqual(self, 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 = assertAlmostEqual(self, 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).
- assertDictContainsSubset(self, expected, actual, msg=None)
- Checks whether actual is a superset of expected.
- assertDictEqual(self, d1, d2, msg=None)
- assertEqual(self, first, second, msg=None)
- Fail if the two objects are unequal as determined by the '=='
operator.
- assertEquals = assertEqual(self, first, second, msg=None)
- Fail if the two objects are unequal as determined by the '=='
operator.
- assertFalse(self, expr, msg=None)
- Fail the test if the expression is true.
- assertGreater(self, a, b, msg=None)
- Just like assertTrue(a > b), but with a nicer default message.
- assertGreaterEqual(self, a, b, msg=None)
- Just like assertTrue(a >= b), but with a nicer default message.
- assertIn(self, member, container, msg=None)
- Just like assertTrue(a in b), but with a nicer default message.
- assertIs(self, expr1, expr2, msg=None)
- Just like assertTrue(a is b), but with a nicer default message.
- assertIsNone(self, obj, msg=None)
- Same as assertTrue(obj is None), with a nicer default message.
- assertIsNot(self, expr1, expr2, msg=None)
- Just like assertTrue(a is not b), but with a nicer default message.
- assertIsNotNone(self, obj, msg=None)
- Included for symmetry with assertIsNone.
- assertLess(self, a, b, msg=None)
- Just like assertTrue(a < b), but with a nicer default message.
- assertLessEqual(self, a, b, msg=None)
- Just like assertTrue(a <= b), but with a nicer default message.
- assertListEqual(self, list1, list2, msg=None)
- A list-specific equality assertion.
Args:
list1: The first list to compare.
list2: The second list to compare.
msg: Optional message to use on failure instead of a list of
differences.
- assertMultiLineEqual(self, first, second, msg=None)
- Assert that two multi-line strings are equal.
- assertNotAlmostEqual(self, 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 = assertNotAlmostEqual(self, 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(self, first, second, msg=None)
- Fail if the two objects are equal as determined by the '=='
operator.
|