summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2019-06-03 08:34:20 +0100
committerGitHub <noreply@github.com>2019-06-03 08:34:20 +0100
commit8565f6b6db0fa9f65449b532a5056a98bad3dc37 (patch)
treeeeeed2b04e30d603a40efbeb8da748325f5f74c3 /Lib/test
parentd9677f36fe486e86bb86f2cd59cb7fc3804bdac1 (diff)
downloadcpython-git-8565f6b6db0fa9f65449b532a5056a98bad3dc37.tar.gz
bpo-35814: Allow unpacking in r.h.s of annotated assignment expressions (GH-13760)
Diffstat (limited to 'Lib/test')
-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