[Python-checkins] cpython (merge 3.2 -> 3.3): #17493: merge with 3.2.

ezio.melotti python-checkins at python.org
Wed Mar 20 17:18:12 CET 2013


http://hg.python.org/cpython/rev/8d22b6ed44e6
changeset: 82839:8d22b6ed44e6
branch: 3.3
parent: 82836:30dcb8dbd495
parent: 82838:54ee934400b3
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Wed Mar 20 18:15:37 2013 +0200
summary:
 #17493: merge with 3.2.
files:
 Lib/test/test_sys.py | 20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -237,9 +237,6 @@
 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,14 +248,15 @@
 
 sys.setrecursionlimit(%d)
 f()""")
- 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,
- err)
+ 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.assertIn(
+ b"Fatal Python error: Cannot recover from stack overflow",
+ err)
 
 def test_getwindowsversion(self):
 # Raise SkipTest if sys doesn't have getwindowsversion attribute
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /