Skip to content

Commit f84da46

Browse files
committed
Add equality test for tuple unpacking in yield
1 parent 31a0c8f commit f84da46

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Lib/test/test_grammar.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,7 @@ def g(): f((yield from ()))
989989
def g(): f((yield from ()), 1)
990990
# Do not require parenthesis for tuple unpacking
991991
def g(): rest = 4, 5, 6; yield 1, 2, 3, *rest
992+
self.assertEquals(list(g()), [(1, 2, 3, 4, 5, 6)])
992993
check_syntax_error(self, "def g(): f(yield 1)")
993994
check_syntax_error(self, "def g(): f(yield 1, 1)")
994995
check_syntax_error(self, "def g(): f(yield from ())")

0 commit comments

Comments
 (0)