Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-152682: delete useless test_disallowed_type_param_names_oom
The regression test has been removed because it was non-functional.
The previous fix for this issue is covered by `test_disallowed_type_param_names()`.
Tests are not required for fixes of this kind.

Signed-off-by: Petr Vaganov <petrvaganoff@gmail.com>
  • Loading branch information
petrvaganoff committed Jul 1, 2026
commit 5120191d7070da4133dc97b94dbe6e8760b95beb
17 changes: 0 additions & 17 deletions Lib/test/test_syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -2861,7 +2861,6 @@ def f(x: *b)
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"):
Expand Down Expand Up @@ -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 = ""
Expand Down
Loading