summaryrefslogtreecommitdiff
path: root/Lib/test/test_grammar.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r--Lib/test/test_grammar.py4
1 files changed, 4 insertions, 0 deletions
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