mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
Issue #26489: Add dictionary unpacking support to Tools/parser/unparse.py
Patch by Guo Ci Teo.
This commit is contained in:
parent
e88dd1c32c
commit
d66dd5ce68
3 changed files with 20 additions and 3 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue