mirror of https://github.com/python/cpython
Use stock assertEqual instead of custom ndiffAssertEqual.
Eventually I'll actually replace the calls in the tests themselves.
This commit is contained in:
parent
88fdeb45ef
commit
eb9e074dca
|
@ -29,15 +29,7 @@ class TestEmailBase(unittest.TestCase):
|
|||
super().__init__(*args, **kw)
|
||||
self.addTypeEqualityFunc(bytes, self.assertBytesEqual)
|
||||
|
||||
def ndiffAssertEqual(self, first, second):
|
||||
"""Like assertEqual except use ndiff for readable output."""
|
||||
if first != second:
|
||||
sfirst = str(first)
|
||||
ssecond = str(second)
|
||||
rfirst = [repr(line) for line in sfirst.splitlines()]
|
||||
rsecond = [repr(line) for line in ssecond.splitlines()]
|
||||
diff = difflib.ndiff(rfirst, rsecond)
|
||||
raise self.failureException(NL + NL.join(diff))
|
||||
ndiffAssertEqual = unittest.TestCase.assertEqual
|
||||
|
||||
def _msgobj(self, filename):
|
||||
with openfile(filename) as fp:
|
||||
|
|
Loading…
Reference in New Issue