Kaydet (Commit) 6a1d84e2 authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) Steve Dower

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).
üst 5eb788bf
...@@ -777,8 +777,10 @@ class FaultHandlerTests(unittest.TestCase): ...@@ -777,8 +777,10 @@ class FaultHandlerTests(unittest.TestCase):
""" """
) )
self.assertEqual(output, []) self.assertEqual(output, [])
# Actual exception code has bit 4 cleared # On Windows older than 7 SP1, the actual exception code has
self.assertEqual(exitcode, exc & ~0x10000000) # bit 29 cleared.
self.assertIn(exitcode,
(exc, exc & ~0x10000000))
@unittest.skipUnless(MS_WINDOWS, 'specific to Windows') @unittest.skipUnless(MS_WINDOWS, 'specific to Windows')
def test_disable_windows_exc_handler(self): def test_disable_windows_exc_handler(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment