diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-10-18 06:02:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-18 06:02:17 (GMT) |
commit | 004618fed7c585d032f3e9327463d2c319b4e8bf (patch) | |
tree | f0f5d9119ec07775ddb53f8a6586dcc35c7a63ff /Lib | |
parent | 2bca5f43af8fc1c7643fb7769d04a25fbd5f0d98 (diff) | |
download | cpython-004618fed7c585d032f3e9327463d2c319b4e8bf.zip cpython-004618fed7c585d032f3e9327463d2c319b4e8bf.tar.gz cpython-004618fed7c585d032f3e9327463d2c319b4e8bf.tar.bz2 |
[3.12] gh-110938: More syntax tests for PEP695 funcs and classes (GH-110986) (#111023)
gh-110938: More syntax tests for PEP695 funcs and classes (GH-110986)
(cherry picked from commit 220bcc9e27c89bf3b3609b80a31b1398840f195e)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_syntax.py | 15 |
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): |