From: Mark Dickinson Date: Sun, 7 Feb 2010 13:09:52 +0000 (+0000) Subject: Actually raise on failure, instead of doing nothing. X-Git-Tag: v2.7a4~229 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1224f4afb43afa3b4e529c99139f067f528a3951;p=thirdparty%2FPython%2Fcpython.git Actually raise on failure, instead of doing nothing. --- diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index 1ab4ea4ec945..cb43624c8fdf 100644 --- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -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___'