summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBatuhan Taskaya <isidentical@gmail.com>2020-05-22 22:32:40 (GMT)
committerGitHub <noreply@github.com>2020-05-22 22:32:40 (GMT)
commita4d219b35e35f9efc406cd70f2812275bcd989fe (patch)
tree834e791394cb65539f4d6b14b562d653f83dd64c /Lib/test
parent0cc7becde0bfe896fd23b5cb14fedfb8f2066fca (diff)
downloadcpython-a4d219b35e35f9efc406cd70f2812275bcd989fe.zip
cpython-a4d219b35e35f9efc406cd70f2812275bcd989fe.tar.gz
cpython-a4d219b35e35f9efc406cd70f2812275bcd989fe.tar.bz2
[3.8] bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c (GH-20156). (GH-20191)
(cherry picked from commit 2135e10dc717c00d10d899d232bebfc59bb25032) Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_future.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_future.py b/Lib/test/test_future.py
index ea13533..5794646 100644
--- a/Lib/test/test_future.py
+++ b/Lib/test/test_future.py
@@ -265,6 +265,10 @@ class AnnotationsFutureTestCase(unittest.TestCase):
eq("dict[str, int]")
eq("set[str,]")
eq("tuple[str, ...]")
+ eq("tuple[(str, *types)]")
+ eq("tuple[xx:yy, (*types,)]")
+ eq("tuple[str, int, (str, int)]")
+ eq("tuple[(*int, str, str, (str, int))]")
eq("tuple[str, int, float, dict[str, int]]")
eq("slice[0]")
eq("slice[0:1]")