diff options
author | Victor Stinner <vstinner@python.org> | 2020-06-10 16:49:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-10 16:49:23 (GMT) |
commit | f6e58aefde2e57e4cb11ea7743955da53a3f1e80 (patch) | |
tree | ae5a760fc2db639f50d8a08e600267b865ac852c /PC/clinic | |
parent | d36cf5f1d20ce9f111a8fc997104785086e8eee6 (diff) | |
download | cpython-f6e58aefde2e57e4cb11ea7743955da53a3f1e80.zip cpython-f6e58aefde2e57e4cb11ea7743955da53a3f1e80.tar.gz cpython-f6e58aefde2e57e4cb11ea7743955da53a3f1e80.tar.bz2 |
bpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779)
test_repl.test_close_stdin() now calls
support.suppress_msvcrt_asserts() to fix the test on Windows.
* Move suppress_msvcrt_asserts() from test.libregrtest.setup to
test.support. Make its verbose parameter optional: verbose=False by
default.
* Add msvcrt.GetErrorMode().
* SuppressCrashReport now uses GetErrorMode() and SetErrorMode() of
the msvcrt module, rather than using ctypes.
* Remove also an unused variable (deadline) in wait_process().
Diffstat (limited to 'PC/clinic')
-rw-r--r-- | PC/clinic/msvcrtmodule.c.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/PC/clinic/msvcrtmodule.c.h b/PC/clinic/msvcrtmodule.c.h index 9701e8a..1ac82cb 100644 --- a/PC/clinic/msvcrtmodule.c.h +++ b/PC/clinic/msvcrtmodule.c.h @@ -590,6 +590,24 @@ exit: #endif /* defined(_DEBUG) */ +PyDoc_STRVAR(msvcrt_GetErrorMode__doc__, +"GetErrorMode($module, /)\n" +"--\n" +"\n" +"Wrapper around GetErrorMode."); + +#define MSVCRT_GETERRORMODE_METHODDEF \ + {"GetErrorMode", (PyCFunction)msvcrt_GetErrorMode, METH_NOARGS, msvcrt_GetErrorMode__doc__}, + +static PyObject * +msvcrt_GetErrorMode_impl(PyObject *module); + +static PyObject * +msvcrt_GetErrorMode(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return msvcrt_GetErrorMode_impl(module); +} + PyDoc_STRVAR(msvcrt_SetErrorMode__doc__, "SetErrorMode($module, mode, /)\n" "--\n" @@ -629,4 +647,4 @@ exit: #ifndef MSVCRT_SET_ERROR_MODE_METHODDEF #define MSVCRT_SET_ERROR_MODE_METHODDEF #endif /* !defined(MSVCRT_SET_ERROR_MODE_METHODDEF) */ -/*[clinic end generated code: output=ab3b5ce5c1447f0e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=20dfbc768edce7c0 input=a9049054013a1b77]*/ |