]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Actually raise on failure, instead of doing nothing.
authorMark Dickinson <dickinsm@gmail.com>
Sun, 7 Feb 2010 13:09:52 +0000 (13:09 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sun, 7 Feb 2010 13:09:52 +0000 (13:09 +0000)
Lib/test/test_format.py

index 1ab4ea4ec9451bd4f3d9992f572454b24957350e..cb43624c8fdf9536f1249e2c798e6fd64c6bf550 100644 (file)
@@ -33,8 +33,8 @@ def testformat(formatstr, args, output=None, limit=None):
         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___'