]> granicus.if.org Git - python/commitdiff
Use stock assertEqual instead of custom ndiffAssertEqual.
authorR David Murray <rdmurray@bitdance.com>
Sun, 10 Apr 2011 19:28:29 +0000 (15:28 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sun, 10 Apr 2011 19:28:29 +0000 (15:28 -0400)
Eventually I'll actually replace the calls in the tests themselves.

Lib/test/test_email/__init__.py

index 54d1c9afa3af58641b1b724b2d83e1c169df092e..69be67891f3d73b745a5899cca9bb1c374b23764 100644 (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: