From 1205b59916317846d9aa16dde7ee81f370a44fa0 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Tue, 17 Oct 2023 16:46:07 +0300 Subject: [PATCH] gh-110938: Add several missing syntax tests for PEP695 funcs and classes --- 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 f5cf9667d564a0..00c5f624ceb3ab 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):