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
3d70d985
Commit
3d70d985
authored
Jun 04, 2011
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Plain Diff
merge heads
parents
b07fc5a4
2bf1c855
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
Lib/test/test_parser.py
Lib/test/test_parser.py
+8
-0
Modules/parsermodule.c
Modules/parsermodule.c
+3
-2
No files found.
Lib/test/test_parser.py
View file @
3d70d985
...
...
@@ -614,6 +614,13 @@ class STObjectTestCase(unittest.TestCase):
# XXX tests for pickling and unpickling of ST objects should go here
class
OtherParserCase
(
unittest
.
TestCase
):
def
test_two_args_to_expr
(
self
):
# See bug #12264
with
self
.
assertRaises
(
TypeError
):
parser
.
expr
(
"a"
,
"b"
)
def
test_main
():
support
.
run_unittest
(
...
...
@@ -622,6 +629,7 @@ def test_main():
CompileTestCase
,
ParserStackLimitTestCase
,
STObjectTestCase
,
OtherParserCase
,
)
...
...
Modules/parsermodule.c
View file @
3d70d985
...
...
@@ -581,10 +581,11 @@ parser_do_parse(PyObject *args, PyObject *kw, char *argspec, int type)
if
(
res
)
((
PyST_Object
*
)
res
)
->
st_flags
.
cf_flags
=
flags
&
PyCF_MASK
;
}
else
else
{
PyParser_SetError
(
&
err
);
PyParser_ClearError
(
&
err
);
}
}
PyParser_ClearError
(
&
err
);
return
(
res
);
}
...
...
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