Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
0d7333e0
Commit
0d7333e0
authored
Mar 09, 2013
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Plain Diff
#11963: merge with 3.2.
parents
b7e6b895
39191840
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
Lib/test/test_parser.py
Lib/test/test_parser.py
+5
-4
No files found.
Lib/test/test_parser.py
View file @
0d7333e0
...
...
@@ -4,6 +4,7 @@ import sys
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 @@ class ParserStackLimitTestCase(unittest.TestCase):
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
.
assert
Raises
(
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
.
assert
Equal
(
err
,
b's_push: parser stack overflow
\
n
MemoryError'
)
class
STObjectTestCase
(
unittest
.
TestCase
):
"""Test operations on ST objects themselves"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment