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