diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-02-07 13:09:52 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-02-07 13:09:52 (GMT) |
commit | 1224f4afb43afa3b4e529c99139f067f528a3951 (patch) | |
tree | 4143bb007f12c41b9fbc030a81957fb5f232cb2d | |
parent | 7ce5c831ccde730a201a9b7a95e5d54cd9b98285 (diff) | |
download | cpython-1224f4afb43afa3b4e529c99139f067f528a3951.zip cpython-1224f4afb43afa3b4e529c99139f067f528a3951.tar.gz cpython-1224f4afb43afa3b4e529c99139f067f528a3951.tar.bz2 |
Actually raise on failure, instead of doing nothing.
-rw-r--r-- | Lib/test/test_format.py | 4 |
1 files 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___' |