Issue #26489: Add dictionary unpacking support to Tools/parser/unparse.py

Patch by Guo Ci Teo.
This commit is contained in:
Berker Peksag 2016-03-06 16:50:44 +02:00
commit d07a1cb53b
3 changed files with 20 additions and 3 deletions

View file

@ -259,6 +259,11 @@ def test_with_as(self):
def test_with_two_items(self):
self.check_roundtrip(with_two_items)
def test_dict_unpacking_in_dict(self):
# See issue 26489
self.check_roundtrip(r"""{**{'y': 2}, 'x': 1}""")
self.check_roundtrip(r"""{**{'y': 2}, **{'x': 1}}""")
class DirectoryTestCase(ASTTestCase):
"""Test roundtrip behaviour on all files in Lib and Lib/test."""