summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_support.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-01-19 19:01:56 (GMT)
committerGuido van Rossum <guido@python.org>2001-01-19 19:01:56 (GMT)
commita1374e429b2f9d94320ca1dc0475a845b99659de (patch)
treee9a48d13d10e1155b7f6531e65db9551dab58aa8 /Lib/test/test_support.py
parente7c87327b3d98359d713b9fc66eae01a041bb624 (diff)
downloadcpython-a1374e429b2f9d94320ca1dc0475a845b99659de.zip
cpython-a1374e429b2f9d94320ca1dc0475a845b99659de.tar.gz
cpython-a1374e429b2f9d94320ca1dc0475a845b99659de.tar.bz2
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.)
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r--Lib/test/test_support.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index c1abf1b..771b147 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -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)