summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-01-19 05:59:21 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-01-19 05:59:21 (GMT)
commit983874dd32432c1e3237ad5f7bcfc3ab83c10f2c (patch)
tree12cf564e3d474d8e874f901752eec76c35974a17 /Lib/test
parentd93c0b6a376126be1879255611e4dcdfd0b83d64 (diff)
downloadcpython-983874dd32432c1e3237ad5f7bcfc3ab83c10f2c.zip
cpython-983874dd32432c1e3237ad5f7bcfc3ab83c10f2c.tar.gz
cpython-983874dd32432c1e3237ad5f7bcfc3ab83c10f2c.tar.bz2
Use constructor form of "raise"; normalize <wink> docstrings.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_support.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 6699b3a..c1abf1b 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -15,10 +15,8 @@ class TestSkipped(Error):
example, if some resource can't be used, such as the network
appears to be unavailable, this should be raised instead of
TestFailed.
-
"""
-
verbose = 1 # Flag set to 0 by regrtest.py
use_large_resources = 1 # Flag set to 0 by regrtest.py
@@ -73,13 +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 an
- AssertionError.
-
- The optinal argument reason can be given to provide
- a better error text.
-
+ The optinal argument reason can be given to provide
+ a better error text.
"""
+
if not condition:
- raise AssertionError,reason
+ raise AssertionError(reason)