diff options
author | Fred Drake <fdrake@acm.org> | 2000-07-24 06:55:00 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-07-24 06:55:00 (GMT) |
commit | 1790dd4b66844bec4dfc27a128d968eda36036cc (patch) | |
tree | 367ae9e24bb4c7fa07e202b31da857da522089da /Lib | |
parent | 6899660a815db5d59347ecbc88830a71baae49f7 (diff) | |
download | cpython-1790dd4b66844bec4dfc27a128d968eda36036cc.zip cpython-1790dd4b66844bec4dfc27a128d968eda36036cc.tar.gz cpython-1790dd4b66844bec4dfc27a128d968eda36036cc.tar.bz2 |
Restore TestSkipped exception; appears to have disappeared in last checkin.
Make both TextFailed and TestSkipped subclasses of Error, which derives
from Exception. Docstrings have been added for the exceptions and module.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_support.py | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index 5dec21b..99bacda 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -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 |