Skip to content

Commit d952d53

Browse files
committed
fix: make test info better
Signed-off-by: yihong0618 <[email protected]>
1 parent 175a13e commit d952d53

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Lib/test/test_repl.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ def test_no_memory(self):
9999
self.assertIn(p.returncode, (1, 120))
100100

101101
@cpython_only
102-
def test_issue134163_exec_hang(self):
103-
# Complete reproduction code that simulates REPL exec() behavior
104-
# note these prints are used can not drop
102+
def test_exec_set_nomemory_hang(self):
103+
# gh-134163 Complete reproduction code that simulates REPL exec() no memory hang
104+
# note these print are used can not drop for trigger the malloc
105105
user_input = dedent("""
106106
exec('''
107107
def test_repl_hanging():
@@ -152,8 +152,7 @@ def test_repl_hanging():
152152
with SuppressCrashReport():
153153
p.stdin.write(user_input)
154154
output = kill_python(p)
155-
# The test should complete without hanging and show expected output
156-
# We expect either successful completion or controlled failure
155+
157156
self.assertIn(p.returncode, (0, 1, 120))
158157
# Verify that the simulation steps were executed or that we got the expected memory error output
159158
# The key test is that it doesn't hang - if we get output, the test passed

0 commit comments

Comments
 (0)