From: Petr Vaganov Date: Wed, 1 Jul 2026 17:38:09 +0000 (+0500) Subject: gh-152682: Remove non-functional `test_syntax.test_disallowed_type_param_names_oom... X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=df2538adfdc8676b5f9057d2b4002a289d53b136;p=thirdparty%2FPython%2Fcpython.git gh-152682: Remove non-functional `test_syntax.test_disallowed_type_param_names_oom` (#152770) --- diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index 80577cf5c84f..04e60c74ce1b 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -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="", mode="exec"): @@ -3202,22 +3201,6 @@ class A: class B[{name}]: pass """, "", 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", "", "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 = ""