[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>
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 @@
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]")