mirror of https://github.com/python/cpython
#17493: merge with 3.3.
This commit is contained in:
commit
a612176c9c
|
@ -239,9 +239,6 @@ class SysModuleTest(unittest.TestCase):
|
||||||
def test_recursionlimit_fatalerror(self):
|
def test_recursionlimit_fatalerror(self):
|
||||||
# A fatal error occurs if a second recursion limit is hit when recovering
|
# A fatal error occurs if a second recursion limit is hit when recovering
|
||||||
# from a first one.
|
# from a first one.
|
||||||
if os.name == "nt":
|
|
||||||
raise unittest.SkipTest(
|
|
||||||
"under Windows, test would generate a spurious crash dialog")
|
|
||||||
code = textwrap.dedent("""
|
code = textwrap.dedent("""
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -253,14 +250,15 @@ class SysModuleTest(unittest.TestCase):
|
||||||
|
|
||||||
sys.setrecursionlimit(%d)
|
sys.setrecursionlimit(%d)
|
||||||
f()""")
|
f()""")
|
||||||
for i in (50, 1000):
|
with test.support.suppress_crash_popup():
|
||||||
sub = subprocess.Popen([sys.executable, '-c', code % i],
|
for i in (50, 1000):
|
||||||
stderr=subprocess.PIPE)
|
sub = subprocess.Popen([sys.executable, '-c', code % i],
|
||||||
err = sub.communicate()[1]
|
stderr=subprocess.PIPE)
|
||||||
self.assertTrue(sub.returncode, sub.returncode)
|
err = sub.communicate()[1]
|
||||||
self.assertTrue(
|
self.assertTrue(sub.returncode, sub.returncode)
|
||||||
b"Fatal Python error: Cannot recover from stack overflow" in err,
|
self.assertIn(
|
||||||
err)
|
b"Fatal Python error: Cannot recover from stack overflow",
|
||||||
|
err)
|
||||||
|
|
||||||
def test_getwindowsversion(self):
|
def test_getwindowsversion(self):
|
||||||
# Raise SkipTest if sys doesn't have getwindowsversion attribute
|
# Raise SkipTest if sys doesn't have getwindowsversion attribute
|
||||||
|
|
Loading…
Reference in New Issue