]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-152682: Remove non-functional `test_syntax.test_disallowed_type_param_names_oom...
authorPetr Vaganov <petrvaganoff@gmail.com>
Wed, 1 Jul 2026 17:38:09 +0000 (22:38 +0500)
committerGitHub <noreply@github.com>
Wed, 1 Jul 2026 17:38:09 +0000 (19:38 +0200)
Lib/test/test_syntax.py

index 80577cf5c84fac24e5bec1e9346f2b2524b6fb17..04e60c74ce1bea600578e600386071b44e951c94 100644 (file)
@@ -2861,7 +2861,6 @@ import textwrap
 import unittest
 
 from test import support
-from test.support.script_helper import assert_python_ok
 
 class SyntaxWarningTest(unittest.TestCase):
     def check_warning(self, code, errtext, filename="<testcase>", mode="exec"):
@@ -3202,22 +3201,6 @@ class A:
     class B[{name}]: pass
                 """, "<testcase>", mode="exec")
 
-    @support.nomemtest
-    def test_disallowed_type_param_names_oom(self):
-        # gh-152682: Don't crash on OOM when formatting the SyntaxError message
-        # in symtable_visit_type_param_bound_or_default.
-        code = textwrap.dedent("""\
-            import _testcapi
-            _testcapi.set_nomemory(0)
-            try:
-                compile("class A[__classdict__]: pass", "<string>", "exec")
-            except MemoryError:
-                pass
-            else:
-                raise RuntimeError('MemoryError not raised')
-        """)
-        assert_python_ok("-c", code)
-
     @support.cpython_only
     def test_nested_named_except_blocks(self):
         code = ""