Commit eb9e074d authored by R David Murray's avatar R David Murray

Use stock assertEqual instead of custom ndiffAssertEqual.

Eventually I'll actually replace the calls in the tests themselves.
parent 88fdeb45
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment