]> granicus.if.org Git - python/commitdiff
Use constructor form of "raise"; normalize <wink> docstrings.
authorTim Peters <tim.peters@gmail.com>
Fri, 19 Jan 2001 05:59:21 +0000 (05:59 +0000)
committerTim Peters <tim.peters@gmail.com>
Fri, 19 Jan 2001 05:59:21 +0000 (05:59 +0000)
Lib/test/test_support.py

index 6699b3a4455b1148c3c789ca93fd3d1e829610a6..c1abf1bf2457cdb1792debace97c3beb43e72609 100644 (file)
@@ -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)