PyDocs

Nav

Development Tools

TestCase.addTypeEqualityFunc

unittest

method of TestCase · Added in 3.1 (source)
  • TestCase.addTypeEqualityFunc(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.
0 Examples
No examples for unittest/TestCase.addTypeEqualityFunc.
See Also
No see-alsos for unittest/TestCase.addTypeEqualityFunc
0 Notes
No notes for TestCase.addTypeEqualityFunc