From: Nikita Sobolev Date: Wed, 18 Oct 2023 05:00:04 +0000 (+0300) Subject: gh-110938: More syntax tests for PEP695 funcs and classes (#110986) X-Git-Tag: v3.13.0a2~418 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=220bcc9e27c89bf3b3609b80a31b1398840f195e;p=thirdparty%2FPython%2Fcpython.git gh-110938: More syntax tests for PEP695 funcs and classes (#110986) --- diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index f5cf9667d564..00c5f624ceb3 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):