def METHOD_NAME(self, a, b, msg=None):
    """Make assertEqual always print useful messages"""
    try:
        super(TestCase, self).METHOD_NAME(a, b)
    except AssertionError as e:
        if msg is None:
            msg = str(e)
        else:
            msg = "%s: %s" % (msg, e)
        if self.is_string(a):
            txta = a
        else:
            txta = pprint.pformat(a)
        if self.is_string(b):
            txtb = b
        else:
            txtb = pprint.pformat(b)
        diff = nicediff(txta, txtb, offset=self.DIFF_OFFSET)
        if len(diff) > self.ASSERT_MAX_DIFF:
            limit = ' (first %s lines)' % self.ASSERT_MAX_DIFF
        else:
            limit = ''
        raise AssertionError("%s:\nDIFF%s:\n%s" % (msg, limit, ''.join(diff[:self.ASSERT_MAX_DIFF])))