Commit 3d70d985 authored by Benjamin Peterson's avatar Benjamin Peterson

merge heads

parents b07fc5a4 2bf1c855
...@@ -614,6 +614,13 @@ class STObjectTestCase(unittest.TestCase): ...@@ -614,6 +614,13 @@ class STObjectTestCase(unittest.TestCase):
# XXX tests for pickling and unpickling of ST objects should go here # 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(): def test_main():
support.run_unittest( support.run_unittest(
...@@ -622,6 +629,7 @@ def test_main(): ...@@ -622,6 +629,7 @@ def test_main():
CompileTestCase, CompileTestCase,
ParserStackLimitTestCase, ParserStackLimitTestCase,
STObjectTestCase, STObjectTestCase,
OtherParserCase,
) )
......
...@@ -581,10 +581,11 @@ parser_do_parse(PyObject *args, PyObject *kw, char *argspec, int type) ...@@ -581,10 +581,11 @@ parser_do_parse(PyObject *args, PyObject *kw, char *argspec, int type)
if (res) if (res)
((PyST_Object *)res)->st_flags.cf_flags = flags & PyCF_MASK; ((PyST_Object *)res)->st_flags.cf_flags = flags & PyCF_MASK;
} }
else else {
PyParser_SetError(&err); PyParser_SetError(&err);
}
PyParser_ClearError(&err); PyParser_ClearError(&err);
}
}
return (res); return (res);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment