mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +00:00
Actually raise on failure, instead of doing nothing.
This commit is contained in:
parent
7ce5c831cc
commit
1224f4afb4
1 changed files with 2 additions and 2 deletions
|
|
@ -33,8 +33,8 @@ def testformat(formatstr, args, output=None, limit=None):
|
||||||
if output and limit is None and result != output:
|
if output and limit is None and result != output:
|
||||||
if verbose:
|
if verbose:
|
||||||
print 'no'
|
print 'no'
|
||||||
print "%s %% %s == %s != %s" % \
|
raise AssertionError("%r %% %r == %r != %r" %
|
||||||
(repr(formatstr), repr(args), repr(result), repr(output))
|
(formatstr, args, result, output))
|
||||||
# when 'limit' is specified, it determines how many characters
|
# when 'limit' is specified, it determines how many characters
|
||||||
# must match exactly; lengths must always match.
|
# must match exactly; lengths must always match.
|
||||||
# ex: limit=5, '12345678' matches '12345___'
|
# ex: limit=5, '12345678' matches '12345___'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue