Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
Check if the old is equal to returned in some cases
  • Loading branch information
aisk committed Jul 17, 2025
commit 79b1e6ed52d21bf37e3aaf25579f76e1fbd54bb8
3 changes: 3 additions & 0 deletions Lib/test/test_msvcrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def test_set_error_mode(self):
returned = msvcrt.set_error_mode(msvcrt.OUT_TO_STDERR)
self.assertIs(type(returned), int)
self.assertNotEqual(returned, -1)
self.assertEqual(old, returned)

returned = msvcrt.set_error_mode(msvcrt.REPORT_ERRMODE)
self.assertIs(type(returned), int)
Expand All @@ -151,6 +152,7 @@ def test_CrtSetReportMode(self):
msvcrt.CRTDBG_MODE_DEBUG)
self.assertIs(type(returned), int)
self.assertNotEqual(returned, -1)
self.assertEqual(old, returned)

returned = msvcrt.CrtSetReportMode(msvcrt.CRT_WARN,
msvcrt.CRTDBG_REPORT_MODE)
Expand All @@ -170,6 +172,7 @@ def test_CrtSetReportFile(self):
returned = msvcrt.CrtSetReportFile(msvcrt.CRT_WARN,
msvcrt.CRTDBG_FILE_STDOUT)
self.assertIs(type(returned), int)
self.assertEqual(old_file, returned)

returned = msvcrt.CrtSetReportFile(msvcrt.CRT_WARN,
msvcrt.CRTDBG_REPORT_FILE)
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy