From 896a88d46ac51a074b440afdbdfba86c7e087a72 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Wed, 18 Oct 2023 08:00:04 +0300 Subject: [PATCH] gh-110938: More syntax tests for PEP695 funcs and classes (GH-110986) (cherry picked from commit 220bcc9e27c89bf3b3609b80a31b1398840f195e) Co-authored-by: Nikita Sobolev --- Lib/test/test_syntax.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index 52fc3573ddb7e0..627ffe6f672d2a 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -1004,11 +1004,26 @@ 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):