summaryrefslogtreecommitdiffstats
path: root/Lib/test/audit-tests.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-06-10 16:49:23 (GMT)
committerGitHub <noreply@github.com>2020-06-10 16:49:23 (GMT)
commitf6e58aefde2e57e4cb11ea7743955da53a3f1e80 (patch)
treeae5a760fc2db639f50d8a08e600267b865ac852c /Lib/test/audit-tests.py
parentd36cf5f1d20ce9f111a8fc997104785086e8eee6 (diff)
downloadcpython-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 'Lib/test/audit-tests.py')
-rw-r--r--Lib/test/audit-tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/audit-tests.py b/Lib/test/audit-tests.py
index b90c4b8..a58395b 100644
--- a/Lib/test/audit-tests.py
+++ b/Lib/test/audit-tests.py
@@ -350,9 +350,9 @@ def test_socket():
if __name__ == "__main__":
- from test.libregrtest.setup import suppress_msvcrt_asserts
+ from test.support import suppress_msvcrt_asserts
- suppress_msvcrt_asserts(False)
+ suppress_msvcrt_asserts()
test = sys.argv[1]
globals()[test]()