summaryrefslogtreecommitdiff
path: root/Lib/test/test_parser.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-06-04 22:06:42 -0500
committerBenjamin Peterson <benjamin@python.org>2011-06-04 22:06:42 -0500
commit2bf1c8551b891d7608c92ca2eceaeb7be0e13568 (patch)
treee386fced7cfd2a33ac8c408599dd69fe385753da /Lib/test/test_parser.py
parent0ba18e6c0243282b5cfbbbba4a94395fd38eee8f (diff)
downloadcpython-2bf1c8551b891d7608c92ca2eceaeb7be0e13568.tar.gz
only clear the parser error if it's set (closes #12264)
Diffstat (limited to 'Lib/test/test_parser.py')
-rw-r--r--Lib/test/test_parser.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
index 020acd500f..2b50fca818 100644
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -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,
)