]> granicus.if.org Git - python/commitdiff
Restore TestSkipped exception; appears to have disappeared in last checkin.
authorFred Drake <fdrake@acm.org>
Mon, 24 Jul 2000 06:55:00 +0000 (06:55 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 24 Jul 2000 06:55:00 +0000 (06:55 +0000)
Make both TextFailed and TestSkipped subclasses of Error, which derives
from Exception.  Docstrings have been added for the exceptions and module.

Lib/test/test_support.py

index 5dec21ba238695fd8445ec30a680a0a0cacffb17..99bacda8e9385f93c782b7e3d7e7eeeb59a09e3f 100644 (file)
@@ -1,9 +1,26 @@
-# Python test set -- supporting definitions.
+"""Supporting definitions for the Python regression test."""
+
+
+class Error(Exception):
+        """Base class for regression test exceptions."""
+
+class TestFailed(Error):
+        """Test failed."""
+
+class TestSkipped(Error):
+        """Test skipped.
+
+        This can be raised to indicate that a test was deliberatly
+        skipped, but not because a feature wasn't available.  For
+        example, if some resource can't be used, such as the network
+        appears to be unavailable, this should be raised instead of
+        TestFailed.
+
+        """
 
-class TestFailed(Exception):
-       pass
 
 verbose = 1                            # Flag set to 0 by regrtest.py
+use_large_resources = 1 # Flag set to 0 by regrtest.py
 
 def unload(name):
        import sys