diff options
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/test.rst | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/Doc/library/test.rst b/Doc/library/test.rst index c1270f4..2c51549 100644 --- a/Doc/library/test.rst +++ b/Doc/library/test.rst @@ -442,13 +442,6 @@ The :mod:`test.support` module defines the following functions: A decorator for running tests that require support for symbolic links. -.. function:: suppress_crash_popup() - - A context manager that disables Windows Error Reporting dialogs using - `SetErrorMode <http://msdn.microsoft.com/en-us/library/windows/desktop/ms680621%28v=vs.85%29.aspx>`_. - On other platforms it's a no-op. - - .. decorator:: anticipate_failure(condition) A decorator to conditionally mark tests with @@ -593,6 +586,21 @@ The :mod:`test.support` module defines the following classes: Temporarily unset the environment variable ``envvar``. +.. class:: SuppressCrashReport() + + A context manager used to try to prevent crash dialog popups on tests that + are expected to crash a subprocess. + + On Windows, it disables Windows Error Reporting dialogs using + `SetErrorMode <http://msdn.microsoft.com/en-us/library/windows/desktop/ms680621.aspx>`_. + + On UNIX, :func:`resource.setrlimit` is used to set + :attr:`resource.RLIMIT_CORE`'s soft limit to 0 to prevent coredump file + creation. + + On both platforms, the old value is restored by :meth:`__exit__`. + + .. class:: WarningsRecorder() Class used to record warnings for unit tests. See documentation of |