[Python-checkins] CVS: python/dist/src/Lib/test test_support.py,1.6,1.7
Fred L. Drake
python-dev@python.org
Sun, 23 Jul 2000 23:55:03 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory slayer.i.sourceforge.net:/tmp/cvs-serv10365/Lib/test
Modified Files:
test_support.py
Log Message:
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.
Index: test_support.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** test_support.py 2000/07/19 17:14:48 1.6
--- test_support.py 2000/07/24 06:55:00 1.7
***************
*** 1,8 ****
! # Python test set -- supporting definitions.
- class TestFailed(Exception):
- pass
verbose = 1 # Flag set to 0 by regrtest.py
def unload(name):
--- 1,25 ----
! """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.
+
+ """
+
+
verbose = 1 # Flag set to 0 by regrtest.py
+ use_large_resources = 1 # Flag set to 0 by regrtest.py
def unload(name):