summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2023-10-18 05:00:04 (GMT)
committerGitHub <noreply@github.com>2023-10-18 05:00:04 (GMT)
commit220bcc9e27c89bf3b3609b80a31b1398840f195e (patch)
tree22f50ac46b1c5b0b4bc2ccca481b9ca47a009d32 /Lib/test
parent411d6a638ebdb91e7bfe9b59a02340b6d1bc98e4 (diff)
downloadcpython-220bcc9e27c89bf3b3609b80a31b1398840f195e.zip
cpython-220bcc9e27c89bf3b3609b80a31b1398840f195e.tar.gz
cpython-220bcc9e27c89bf3b3609b80a31b1398840f195e.tar.bz2
gh-110938: More syntax tests for PEP695 funcs and classes (#110986)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_syntax.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index f5cf966..00c5f62 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -1004,11 +1004,26 @@ Missing ':' before suites:
Traceback (most recent call last):
SyntaxError: expected ':'
+ >>> def f[T]()
+ ... pass
+ Traceback (most recent call last):
+ SyntaxError: expected ':'
+
>>> class A
... pass
Traceback (most recent call last):
SyntaxError: expected ':'
+ >>> class A[T]
+ ... pass
+ Traceback (most recent call last):
+ SyntaxError: expected ':'
+
+ >>> class A[T]()
+ ... pass
+ Traceback (most recent call last):
+ SyntaxError: expected ':'
+
>>> class R&D:
... pass
Traceback (most recent call last):