Skip to content

Commit df2538a

Browse files
authored
gh-152682: Remove non-functional test_syntax.test_disallowed_type_param_names_oom (#152770)
1 parent f21f338 commit df2538a

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

Lib/test/test_syntax.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2861,7 +2861,6 @@ def f(x: *b)
28612861
import unittest
28622862

28632863
from test import support
2864-
from test.support.script_helper import assert_python_ok
28652864

28662865
class SyntaxWarningTest(unittest.TestCase):
28672866
def check_warning(self, code, errtext, filename="<testcase>", mode="exec"):
@@ -3202,22 +3201,6 @@ class A:
32023201
class B[{name}]: pass
32033202
""", "<testcase>", mode="exec")
32043203

3205-
@support.nomemtest
3206-
def test_disallowed_type_param_names_oom(self):
3207-
# gh-152682: Don't crash on OOM when formatting the SyntaxError message
3208-
# in symtable_visit_type_param_bound_or_default.
3209-
code = textwrap.dedent("""\
3210-
import _testcapi
3211-
_testcapi.set_nomemory(0)
3212-
try:
3213-
compile("class A[__classdict__]: pass", "<string>", "exec")
3214-
except MemoryError:
3215-
pass
3216-
else:
3217-
raise RuntimeError('MemoryError not raised')
3218-
""")
3219-
assert_python_ok("-c", code)
3220-
32213204
@support.cpython_only
32223205
def test_nested_named_except_blocks(self):
32233206
code = ""

0 commit comments

Comments
 (0)