Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
gh-126028: Add more tests for msvcrt module#126029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Changes from1 commit
71d7cc7
e14193d
f76b823
b0f2acc
a3f1546
13d4345
fee526e
c11647c
54ae00e
90b904a
79b1e6e
d70b3ce
c5c4005
62a8389
2d794f3
2fbd2e8
c3726e1
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -4,7 +4,7 @@ | ||
import unittest | ||
from textwrap import dedent | ||
from test.support import os_helper, requires_resource, Py_DEBUG | ||
from test.support.os_helper import TESTFN, TESTFN_ASCII | ||
if sys.platform != "win32": | ||
@@ -115,6 +115,28 @@ def test_heap_min(self): | ||
except OSError: | ||
pass | ||
def test_GetErrorMode(self): | ||
msvcrt.GetErrorMode() | ||
aisk marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
def test_SetErrorMode(self): | ||
old = msvcrt.SetErrorMode(0) | ||
msvcrt.SetErrorMode(old) | ||
sobolevn marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page.
aisk marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
@unittest.skipUnless(Py_DEBUG, "only avialable under debug build") | ||
aisk marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
def test_set_error_mode(self): | ||
old = msvcrt.set_error_mode(msvcrt.OUT_TO_STDERR) | ||
msvcrt.set_error_mode(old) | ||
@unittest.skipUnless(Py_DEBUG, "only avialable under debug build") | ||
def test_CrtSetReportMode(self): | ||
old = msvcrt.CrtSetReportMode(msvcrt.CRT_WARN, msvcrt.CRTDBG_MODE_DEBUG) | ||
msvcrt.CrtSetReportMode(msvcrt.CRT_WARN, old) | ||
@unittest.skipUnless(Py_DEBUG, "only avialable under debug build") | ||
def test_CrtSetReportFile(self): | ||
old = msvcrt.CrtSetReportFile(msvcrt.CRT_WARN, sys.stdout.fileno()) | ||
msvcrt.CrtSetReportFile(msvcrt.CRT_WARN, old) | ||
if __name__ == "__main__": | ||
unittest.main() |
Uh oh!
There was an error while loading.Please reload this page.