From 1224f4afb43afa3b4e529c99139f067f528a3951 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sun, 7 Feb 2010 13:09:52 +0000 Subject: Actually raise on failure, instead of doing nothing. --- Lib/test/test_format.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index 1ab4ea4..cb43624 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___' -- cgit v0.12