Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Mark as CPython-only and mention _Py_FindSourceFile
  • Loading branch information
johnslavik committed Dec 15, 2025
commit ae292f554c1225353efdb0f52188ab82a18e3b18
2 changes: 2 additions & 0 deletions Lib/test/test_traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ def __del__(self):
b'ZeroDivisionError: division by zero']
self.assertEqual(stderr.splitlines(), expected)

@cpython_only
def test_lost_io_open(self):
# GH-142737: Display the traceback even if io.open is lost
crasher = textwrap.dedent("""\
Expand All @@ -535,6 +536,7 @@ def test_lost_io_open(self):
raise RuntimeError("should not crash")
""")

# Create a temporary script to go through _Py_FindSourceFile
with temp_dir() as script_dir:
script = make_script(
script_dir=script_dir,
Expand Down
Loading