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:15 +02:00
parent e88dd1c32c
commit d66dd5ce68
3 changed files with 20 additions and 3 deletions

View file

@ -250,6 +250,11 @@ class UnparseTestCase(ASTTestCase):
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."""