From 8565f6b6db0fa9f65449b532a5056a98bad3dc37 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Mon, 3 Jun 2019 08:34:20 +0100 Subject: bpo-35814: Allow unpacking in r.h.s of annotated assignment expressions (GH-13760) --- Lib/test/test_grammar.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lib/test') diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 2a3b71fac4..78d94593c7 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -454,6 +454,10 @@ class GrammarTests(unittest.TestCase): exec(stmt, ns) self.assertEqual(list(ns['f']()), [None]) + ns = {"a": 1, 'b': (2, 3, 4), "c":5, "Tuple": typing.Tuple} + exec('x: Tuple[int, ...] = a,*b,c', ns) + self.assertEqual(ns['x'], (1, 2, 3, 4, 5)) + def test_funcdef(self): ### [decorators] 'def' NAME parameters ['->' test] ':' suite ### decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE -- cgit v1.2.1