[Python-checkins] cpython (merge 3.3 -> default): #11963: merge with 3.3.

ezio.melotti python-checkins at python.org
Sat Mar 9 21:21:57 CET 2013


http://hg.python.org/cpython/rev/acf6ffc57fcf
changeset: 82577:acf6ffc57fcf
parent: 82573:f521fddc5092
parent: 82576:185c923f21ec
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Sat Mar 09 22:21:32 2013 +0200
summary:
 #11963: merge with 3.3.
files:
 Lib/test/test_parser.py | 9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -4,6 +4,7 @@
 import operator
 import struct
 from test import support
+from test.script_helper import assert_python_failure
 
 #
 # First, we test that we can generate trees from valid source fragments,
@@ -611,10 +612,10 @@
 
 def test_trigger_memory_error(self):
 e = self._nested_expression(100)
- print("Expecting 's_push: parser stack overflow' in next line",
- file=sys.stderr)
- sys.stderr.flush()
- self.assertRaises(MemoryError, parser.expr, e)
+ rc, out, err = assert_python_failure('-c', e)
+ # parsing the expression will result in an error message
+ # followed by a MemoryError (see #11963)
+ self.assertEqual(err, b's_push: parser stack overflow\nMemoryError')
 
 class STObjectTestCase(unittest.TestCase):
 """Test operations on ST objects themselves"""
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

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