summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libtest.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/lib/libtest.tex')
-rw-r--r--Doc/lib/libtest.tex24
1 files changed, 24 insertions, 0 deletions
diff --git a/Doc/lib/libtest.tex b/Doc/lib/libtest.tex
index 54a24b1..f89c707 100644
--- a/Doc/lib/libtest.tex
+++ b/Doc/lib/libtest.tex
@@ -263,6 +263,12 @@ If no match is found \var{filename} is returned.
This does not equal a failure since it could be the path to the file.
\end{funcdesc}
+\begin{funcdesc}{guard_warnings_filter}{}
+Returns a context manager that guards the \module{warnings} module's
+filter settings.
+\versionadded{2.6}
+\end{funcdesc}
+
\begin{funcdesc}{run_unittest}{*classes}
Execute \class{unittest.TestCase} subclasses passed to the function.
The function scans the classes for methods starting with the prefix
@@ -275,4 +281,22 @@ Execute the \class{unittest.TestSuite} instance \var{suite}.
The optional argument \var{testclass} accepts one of the test classes in the
suite so as to print out more detailed information on where the testing suite
originated from.
+
+The \module{test.test_support} module defines the following classes:
+
+\begin{classdesc}{EnvironmentVarGuard}{}
+Class used to temporarily set or unset environment variables. Instances can be
+used as a context manager.
+\versionadded{2.6}
+\end{classdesc}
+
+\begin{methoddesc}{set}{envvar, value}
+Temporarily set the environment variable \code{envvar} to the value of
+\code{value}.
+\end{methoddesc}
+
+\begin{methoddesc}{unset}{envvar}
+Temporarily unset the environment variable \code{envvar}.
+\end{methoddesc}
+
\end{funcdesc}