[Python-checkins] r78086 - python/trunk/Lib/test/test_format.py

mark.dickinson python-checkins at python.org
Sun Feb 7 14:09:52 CET 2010


Author: mark.dickinson
Date: Sun Feb  7 14:09:52 2010
New Revision: 78086

Log:
Actually raise on failure, instead of doing nothing.

Modified:
   python/trunk/Lib/test/test_format.py

Modified: python/trunk/Lib/test/test_format.py
==============================================================================
--- python/trunk/Lib/test/test_format.py	(original)
+++ python/trunk/Lib/test/test_format.py	Sun Feb  7 14:09:52 2010
@@ -33,8 +33,8 @@
         if output and limit is None and result != output:
             if verbose:
                 print 'no'
-            print "%s %% %s == %s != %s" % \
-                  (repr(formatstr), repr(args), repr(result), repr(output))
+            raise AssertionError("%r %% %r == %r != %r" %
+                                (formatstr, args, result, output))
         # when 'limit' is specified, it determines how many characters
         # must match exactly; lengths must always match.
         # ex: limit=5, '12345678' matches '12345___'


More information about the Python-checkins mailing list