summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-06-06 17:40:41 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2017-06-06 17:40:41 (GMT)
commit6a1d84e2b37291b7e3bc5ddad14a60aed430e404 (patch)
tree30faf672d5fb9536c40266d90aaba3b51f10434e
parent5eb788bf7f54a8e04429e18fc332db858edd64b6 (diff)
downloadcpython-6a1d84e2b37291b7e3bc5ddad14a60aed430e404.zip
cpython-6a1d84e2b37291b7e3bc5ddad14a60aed430e404.tar.gz
cpython-6a1d84e2b37291b7e3bc5ddad14a60aed430e404.tar.bz2
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).
-rw-r--r--Lib/test/test_faulthandler.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
index c965d67..e2fcb2b 100644
--- a/Lib/test/test_faulthandler.py
+++ b/Lib/test/test_faulthandler.py
@@ -777,8 +777,10 @@ class FaultHandlerTests(unittest.TestCase):
"""
)
self.assertEqual(output, [])
- # Actual exception code has bit 4 cleared
- self.assertEqual(exitcode, exc & ~0x10000000)
+ # On Windows older than 7 SP1, the actual exception code has
+ # bit 29 cleared.
+ self.assertIn(exitcode,
+ (exc, exc & ~0x10000000))
@unittest.skipUnless(MS_WINDOWS, 'specific to Windows')
def test_disable_windows_exc_handler(self):