FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-152682: Remove useless `test_syntax.test_disallowed_type_param_names_oom` by petrvaganoff · Pull Request #152770 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
17 changes: 0 additions & 17 deletions Lib/test/test_syntax.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL