summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2014-07-23 17:06:47 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2014-07-23 17:06:47 (GMT)
commitf886697659a6ce9541bfc271d34929f3b225243e (patch)
treedb3f5ecab45ee4ab5c81eeda74d8bb82d33fd6d3 /Doc/library
parentb848944d728faf9a5e6f4424a5c270734cbe4ce8 (diff)
parentf012ba42fe54253378a2784aaf7177aa36be579a (diff)
downloadcpython-f886697659a6ce9541bfc271d34929f3b225243e.zip
cpython-f886697659a6ce9541bfc271d34929f3b225243e.tar.gz
cpython-f886697659a6ce9541bfc271d34929f3b225243e.tar.bz2
Closes #22002: Merge with 3.4
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/test.rst17
1 files changed, 16 insertions, 1 deletions
diff --git a/Doc/library/test.rst b/Doc/library/test.rst
index 83026d8..7a7182a 100644
--- a/Doc/library/test.rst
+++ b/Doc/library/test.rst
@@ -461,7 +461,7 @@ The :mod:`test.support` module defines the following functions:
.. function:: make_bad_fd()
Create an invalid file descriptor by opening and closing a temporary file,
- and returning its descripor.
+ and returning its descriptor.
.. function:: import_module(name, deprecated=False)
@@ -554,6 +554,21 @@ The :mod:`test.support` module defines the following functions:
run simultaneously, which is a problem for buildbots.
+.. function:: load_package_tests(pkg_dir, loader, standard_tests, pattern)
+
+ Generic implementation of the :mod:`unittest` ``load_tests`` protocol for
+ use in test packages. *pkg_dir* is the root directory of the package;
+ *loader*, *standard_tests*, and *pattern* are the arguments expected by
+ ``load_tests``. In simple cases, the test package's ``__init__.py``
+ can be the following::
+
+ import os
+ from test.support import load_package_tests
+
+ def load_tests(*args):
+ return load_package_tests(os.path.dirname(__file__), *args)
+
+
The :mod:`test.support` module defines the following classes:
.. class:: TransientResource(exc, **kwargs)