diff --git a/test/renaming/test_bind_names.py b/test/renaming/test_bind_names.py index 2dd1e610..514aad90 100644 --- a/test/renaming/test_bind_names.py +++ b/test/renaming/test_bind_names.py @@ -58,6 +58,8 @@ def expected(namespace_type, node_type, name='', global_names=None, nonlocal_nam return ns def test_functiondef_binding(): + if sys.version_info < (3, 12): + pytest.skip('Type Parameters not supported in Python < 3.12') source = ''' @decorator @@ -82,6 +84,8 @@ def A[B](C): assert_namespace_tree(module_namespace, expected_namespaces) def test_classdef_binding(): + if sys.version_info < (3, 12): + pytest.skip('Type Parameters not supported in Python < 3.12') source = ''' @decorator diff --git a/test/renaming/test_create_namespaces.py b/test/renaming/test_create_namespaces.py index c2a10e06..10d7dd93 100644 --- a/test/renaming/test_create_namespaces.py +++ b/test/renaming/test_create_namespaces.py @@ -166,6 +166,8 @@ def test_dictcomp(): assert_namespace_tree(module_namespace, expected_namespaces) def test_typeparam(): + if sys.version_info < (3, 12): + pytest.skip('Type Parameters not supported in Python < 3.12') source = ''' @decorator @@ -225,6 +227,8 @@ def test_lambda(): assert_namespace_tree(module_namespace, expected_namespaces) def test_async_functiondef(): + if sys.version_info < (3, 12): + pytest.skip('Type Parameters not supported in Python < 3.12') source = ''' @decorator @@ -253,6 +257,8 @@ async def f[T: int, U: (int, str), *V, **P]( assert_namespace_tree(module_namespace, expected_namespaces) def test_classdef(): + if sys.version_info < (3, 12): + pytest.skip('Type Parameters not supported in Python < 3.12') source = ''' @decorator diff --git a/test/renaming/test_resolve_names.py b/test/renaming/test_resolve_names.py index 311790bc..cce3d935 100644 --- a/test/renaming/test_resolve_names.py +++ b/test/renaming/test_resolve_names.py @@ -466,6 +466,8 @@ def C(): assert print_namespace(module_namespace) == print_namespace(expected_namespaces) def test_function_type_params(): + if sys.version_info < (3, 12): + pytest.skip('Type Parameters not supported in Python < 3.12') source = ''' def A[T](): @@ -495,6 +497,8 @@ def A[T](): assert print_namespace(module_namespace) == print_namespace(expected_namespaces) def test_function_class_type_params(): + if sys.version_info < (3, 12): + pytest.skip('Type Parameters not supported in Python < 3.12') source = ''' class Class[T]: