Skip to content

Commit 53e1ef6

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. (cherry picked from commit de0175d)
1 parent 8c7c96c commit 53e1ef6

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
@@ -13,7 +13,7 @@ def test_resize_no_editline(self):
1313
dbg = lldb.SBDebugger.Create(False)
1414
# Set the input handle to some stream so that we don't start the
1515
# editline interface.
16-
dbg.SetInputFileHandle(io.BytesIO(b""), True)
16+
dbg.SetInputFileHandle(open("input_file"), True)
1717
opts = lldb.SBCommandInterpreterRunOptions()
1818
# Launch the command interpreter now.
1919
dbg.RunCommandInterpreter(True, True, opts, 0, False, False)

lldb/test/API/iohandler/resize/input_file

Whitespace-only changes.

0 commit comments

Comments
 (0)