Skip to content

bpo-40826: Fix test_repl.test_close_stdin() on Windows#20779

Merged
vstinner merged 2 commits intopython:masterfrom
vstinner:suppress_msvcrt_asserts
Jun 10, 2020
Merged

bpo-40826: Fix test_repl.test_close_stdin() on Windows#20779
vstinner merged 2 commits intopython:masterfrom
vstinner:suppress_msvcrt_asserts

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jun 10, 2020

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().

https://bugs.python.org/issue40826

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().
@vstinner vstinner merged commit f6e58ae into python:master Jun 10, 2020
@vstinner vstinner deleted the suppress_msvcrt_asserts branch June 10, 2020 16:49
vstinner added a commit that referenced this pull request Jun 10, 2020
…-20785)

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.
* SuppressCrashReport now uses SetErrorMode() of the msvcrt module,
  rather than using ctypes.
* Remove also an unused variable (deadline) in wait_process().

(cherry picked from commit f6e58ae)
vstinner added a commit that referenced this pull request Jun 10, 2020
…-20785) (GH-20787)

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.
* SuppressCrashReport now uses SetErrorMode() of the msvcrt module,
  rather than using ctypes.
* Remove also an unused variable (deadline) in wait_process().

(cherry picked from commit f6e58ae)
(cherry picked from commit 4a4f660)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants