Skip to content

Commit 13d4345

Browse files
committed
Check the result in some tests
1 parent a3f1546 commit 13d4345

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lib/test/test_msvcrt.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def test_set_error_mode(self):
133133

134134
returned = msvcrt.set_error_mode(msvcrt.OUT_TO_STDERR)
135135
self.assertIs(type(returned), int)
136+
self.assertNotEqual(returned, -1)
136137
self.assertEqual(old, returned)
137138

138139
@unittest.skipUnless(Py_DEBUG, "only available under debug build")
@@ -144,6 +145,7 @@ def test_CrtSetReportMode(self):
144145
returned = msvcrt.CrtSetReportMode(msvcrt.CRT_WARN,
145146
msvcrt.CRTDBG_MODE_DEBUG)
146147
self.assertIs(type(returned), int)
148+
self.assertNotEqual(returned, -1)
147149
self.assertEqual(old, returned)
148150

149151
@unittest.skipUnless(Py_DEBUG, "only available under debug build")

0 commit comments

Comments
 (0)