Change verify() function to raise TestFailed, not AssertionError.

(I realize that I didn't really test this, because all the tests
succeed, so verify() never raised an AssertionError -- but the test
suite still succeeds, so I'm not too worried.)
This commit is contained in:
Guido van Rossum 2001-01-19 19:01:56 +00:00
parent e7c87327b3
commit a1374e429b
2 changed files with 8 additions and 8 deletions

View file

@ -71,11 +71,11 @@ def findfile(file, here=__file__):
return file
def verify(condition, reason='test failed'):
"""Verify that condition is true. If not, raise an AssertionError.
"""Verify that condition is true. If not, raise TestFailed.
The optinal argument reason can be given to provide
a better error text.
"""
if not condition:
raise AssertionError(reason)
raise TestFailed(reason)