summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-03-01 12:47:50 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-03-01 12:47:50 (GMT)
commiteae2b38948143a36d61bd2dabf07794613158efa (patch)
treeb300490eda37adefdd4dbfc566473967d91c9f90 /Doc
parentdacb6858e88b6c4cb4659400e73b81e88864a7fa (diff)
downloadcpython-eae2b38948143a36d61bd2dabf07794613158efa.zip
cpython-eae2b38948143a36d61bd2dabf07794613158efa.tar.gz
cpython-eae2b38948143a36d61bd2dabf07794613158efa.tar.bz2
#16935: unittest now counts the module as skipped if it raises SkipTest, instead of counting it as an error. Patch by Zachary Ware.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/unittest.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 29ae1f9..00eaa53 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -1493,7 +1493,9 @@ Loading and running tests
directory must be specified separately.
If importing a module fails, for example due to a syntax error, then this
- will be recorded as a single error and discovery will continue.
+ will be recorded as a single error and discovery will continue. If the
+ import failure is due to ``SkipTest`` being raised, it will be recorded
+ as a skip instead of an error.
If a test package name (directory with :file:`__init__.py`) matches the
pattern then the package will be checked for a ``load_tests``
@@ -1512,6 +1514,10 @@ Loading and running tests
.. versionadded:: 3.2
+ .. versionchanged:: 3.4
+ Modules that raise ``SkipTest`` on import are recorded as skips, not
+ errors.
+
The following attributes of a :class:`TestLoader` can be configured either by
subclassing or assignment on an instance: