summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unparse.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-05-16 13:01:34 (GMT)
committerGitHub <noreply@github.com>2022-05-16 13:01:34 (GMT)
commit52e6596fb5f9371f3a1434dd7816e400862b4df8 (patch)
tree4bf4ca6b5b85b0a5dcf7b51fc3e1b57afc76619e /Lib/test/test_unparse.py
parent2ef6a986ee7e59461578f7847695f29d0fe1d065 (diff)
downloadcpython-52e6596fb5f9371f3a1434dd7816e400862b4df8.zip
cpython-52e6596fb5f9371f3a1434dd7816e400862b4df8.tar.gz
cpython-52e6596fb5f9371f3a1434dd7816e400862b4df8.tar.bz2
gh-92671: Don't omit parentheses when unparsing empty tuples (GH-92673)
(cherry picked from commit f6fd8aac13714ce17650eb4a648d5c08f0be53b4) Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
Diffstat (limited to 'Lib/test/test_unparse.py')
-rw-r--r--Lib/test/test_unparse.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_unparse.py b/Lib/test/test_unparse.py
index f999ae8..969aa16 100644
--- a/Lib/test/test_unparse.py
+++ b/Lib/test/test_unparse.py
@@ -648,6 +648,9 @@ class CosmeticTestCase(ASTTestCase):
self.check_src_roundtrip(source.format(target=target))
def test_star_expr_assign_target_multiple(self):
+ self.check_src_roundtrip("() = []")
+ self.check_src_roundtrip("[] = ()")
+ self.check_src_roundtrip("() = [a] = c, = [d] = e, f = () = g = h")
self.check_src_roundtrip("a = b = c = d")
self.check_src_roundtrip("a, b = c, d = e, f = g")
self.check_src_roundtrip("[a, b] = [c, d] = [e, f] = g")