Skip to content

Commit de0175d

Browse files
committed
[lldb] Make TestIOHandlerResizeNoEditline pass with Python 2
io.BytesIO seems to produce a stream in Python 2 which isn't recognized as a file object in the SWIG API, so this test fails for Python 2 (and I assume also an old SWIG version needs to be involved). Instead just open an empty input file which is a file object in all Python versions to make this test pass everywhere.
1 parent a256193 commit de0175d

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

lldb/test/API/iohandler/resize/TestIOHandlerResizeNoEditline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def test_resize_no_editline(self):
1414
dbg = lldb.SBDebugger.Create(False)
1515
# Set the input handle to some stream so that we don't start the
1616
# editline interface.
17-
dbg.SetInputFileHandle(io.BytesIO(b""), True)
17+
dbg.SetInputFileHandle(open("input_file"), True)
1818
opts = lldb.SBCommandInterpreterRunOptions()
1919
# Launch the command interpreter now.
2020
dbg.RunCommandInterpreter(True, True, opts, 0, False, False)

lldb/test/API/iohandler/resize/input_file

Whitespace-only changes.

0 commit comments

Comments
 (0)