[Python-checkins] cpython (merge 3.4 -> default): (Merge 3.4) Issue #21773: Fix TestStdLib.test_pydoc() of test_enum. Patch

victor.stinner python-checkins at python.org
Mon Jun 16 22:51:55 CEST 2014


http://hg.python.org/cpython/rev/e82ba67d7472
changeset: 91220:e82ba67d7472
parent: 91218:34881ee3eec5
parent: 91219:1536085d4a94
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Jun 16 22:51:36 2014 +0200
summary:
 (Merge 3.4) Issue #21773: Fix TestStdLib.test_pydoc() of test_enum. Patch
written by Claudiu Popa.
The print_diffs() function was not defined, using the assertEqual() is more
reliable.
files:
 Lib/test/test_enum.py | 4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py
--- a/Lib/test/test_enum.py
+++ b/Lib/test/test_enum.py
@@ -1528,9 +1528,7 @@
 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((
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /