Commit 958f7ae8 authored by Ezio Melotti's avatar Ezio Melotti

#17493: re-enable a test on Windows. Patch by Zachary Ware.

parent 93115e09
......@@ -237,9 +237,6 @@ class SysModuleTest(unittest.TestCase):
def test_recursionlimit_fatalerror(self):
# A fatal error occurs if a second recursion limit is hit when recovering
# from a first one.
if os.name == "nt":
raise unittest.SkipTest(
"under Windows, test would generate a spurious crash dialog")
code = textwrap.dedent("""
import sys
......@@ -251,13 +248,14 @@ class SysModuleTest(unittest.TestCase):
sys.setrecursionlimit(%d)
f()""")
with test.support.suppress_crash_popup():
for i in (50, 1000):
sub = subprocess.Popen([sys.executable, '-c', code % i],
stderr=subprocess.PIPE)
err = sub.communicate()[1]
self.assertTrue(sub.returncode, sub.returncode)
self.assertTrue(
b"Fatal Python error: Cannot recover from stack overflow" in err,
self.assertIn(
b"Fatal Python error: Cannot recover from stack overflow",
err)
def test_getwindowsversion(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