MCPcopy Index your code
hub / github.com/python/cpython / _baseAssertEqual

Method _baseAssertEqual

Lib/unittest/case.py:913–918  ·  view source on GitHub ↗

The default assertEqual implementation, not type specific.

(self, first, second, msg=None)

Source from the content-addressed store, hash-verified

911 return self._baseAssertEqual
912
913 def _baseAssertEqual(self, first, second, msg=None):
914 """The default assertEqual implementation, not type specific."""
915 if not first == second:
916 standardMsg = '%s != %s' % _common_shorten_repr(first, second)
917 msg = self._formatMessage(msg, standardMsg)
918 raise self.failureException(msg)
919
920 def assertEqual(self, first, second, msg=None):
921 """Fail if the two objects are unequal as determined by the '=='

Callers 1

assertMultiLineEqualMethod · 0.95

Calls 2

_formatMessageMethod · 0.95
_common_shorten_reprFunction · 0.85

Tested by

no test coverage detected