Skip to content

Commit 6a1d84e

Browse files
vstinnerzooba
authored andcommitted
bpo-30557: Fix test_faulthandler (#1969)
On Windows 8, 8.1 and 10 at least, the exit code is the exception code (no bit is cleared).
1 parent 5eb788b commit 6a1d84e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/test/test_faulthandler.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,8 +777,10 @@ def test_raise_nonfatal_exception(self):
777777
"""
778778
)
779779
self.assertEqual(output, [])
780-
# Actual exception code has bit 4 cleared
781-
self.assertEqual(exitcode, exc & ~0x10000000)
780+
# On Windows older than 7 SP1, the actual exception code has
781+
# bit 29 cleared.
782+
self.assertIn(exitcode,
783+
(exc, exc & ~0x10000000))
782784

783785
@unittest.skipUnless(MS_WINDOWS, 'specific to Windows')
784786
def test_disable_windows_exc_handler(self):

0 commit comments

Comments
 (0)