Use stock assertEqual instead of custom ndiffAssertEqual.

Eventually I'll actually replace the calls in the tests themselves.
This commit is contained in:
R David Murray 2011-04-10 15:28:29 -04:00
parent 88fdeb45ef
commit eb9e074dca
1 changed files with 1 additions and 9 deletions

View File

@ -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: