summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/tests
diff options
context:
space:
mode:
authorZsolt Dollenstein <zsol.zsol@gmail.com>2019-10-24 06:19:07 (GMT)
committerMiss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com>2019-10-24 06:19:07 (GMT)
commit96b06aefe23521b61e4e9cdd44f5d30b00c7eb95 (patch)
treecb3193c53116b83c483afae524b4c1015bf4e2af /Lib/lib2to3/tests
parent3bbb6db545eff73ba4031bd9b8f2ef71b84c906e (diff)
downloadcpython-96b06aefe23521b61e4e9cdd44f5d30b00c7eb95.zip
cpython-96b06aefe23521b61e4e9cdd44f5d30b00c7eb95.tar.gz
cpython-96b06aefe23521b61e4e9cdd44f5d30b00c7eb95.tar.bz2
bpo-33348: parse expressions after * and ** in lib2to3 (GH-6586)
These are valid even in python 2.7 https://bugs.python.org/issue33348 Automerge-Triggered-By: @gpshead
Diffstat (limited to 'Lib/lib2to3/tests')
-rw-r--r--Lib/lib2to3/tests/test_parser.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py
index f22d399..a0c31e8 100644
--- a/Lib/lib2to3/tests/test_parser.py
+++ b/Lib/lib2to3/tests/test_parser.py
@@ -253,6 +253,13 @@ class TestUnpackingGeneralizations(GrammarTest):
def test_double_star_dict_literal_after_keywords(self):
self.validate("""func(spam='fried', **{'eggs':'scrambled'})""")
+ def test_double_star_expression(self):
+ self.validate("""func(**{'a':2} or {})""")
+ self.validate("""func(**() or {})""")
+
+ def test_star_expression(self):
+ self.validate("""func(*[] or [2])""")
+
def test_list_display(self):
self.validate("""[*{2}, 3, *[4]]""")