]> granicus.if.org Git - python/commitdiff
Issue #21773: Fix TestStdLib.test_pydoc() of test_enum. Patch written by
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 16 Jun 2014 20:48:43 +0000 (22:48 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 16 Jun 2014 20:48:43 +0000 (22:48 +0200)
Claudiu Popa.

The print_diffs() function was not defined, using the assertEqual() is more
reliable.

Lib/test/test_enum.py

index b8ef632a0dbd13b059244b66172345eb2e854411..f1f80631eb5739b72cc9d70593cdd96a84a1277a 100644 (file)
@@ -1528,9 +1528,7 @@ class TestStdLib(unittest.TestCase):
         helper = pydoc.Helper(output=output)
         helper(self.Color)
         result = output.getvalue().strip()
-        if result != expected_text:
-            print_diffs(expected_text, result)
-            self.fail("outputs are not equal, see diff above")
+        self.assertEqual(result, expected_text)
 
     def test_inspect_getmembers(self):
         values = dict((