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