From: R David Murray Date: Sun, 10 Apr 2011 19:28:29 +0000 (-0400) Subject: Use stock assertEqual instead of custom ndiffAssertEqual. X-Git-Tag: v3.3.0a1~2628 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb9e074dcaeaf4212750f32c106fb12fc4d9f57c;p=python Use stock assertEqual instead of custom ndiffAssertEqual. Eventually I'll actually replace the calls in the tests themselves. --- diff --git a/Lib/test/test_email/__init__.py b/Lib/test/test_email/__init__.py index 54d1c9afa3..69be67891f 100644 --- a/Lib/test/test_email/__init__.py +++ b/Lib/test/test_email/__init__.py @@ -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: