Author: Raphael Isemann Date: 2020-07-07T13:54:14+02:00 New Revision: de0175d04bc3679c7bd8dc64520e790bf38f30b0
URL: https://github.com/llvm/llvm-project/commit/de0175d04bc3679c7bd8dc64520e790bf38f30b0 DIFF: https://github.com/llvm/llvm-project/commit/de0175d04bc3679c7bd8dc64520e790bf38f30b0.diff LOG: [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. Added: lldb/test/API/iohandler/resize/input_file Modified: lldb/test/API/iohandler/resize/TestIOHandlerResizeNoEditline.py Removed: ################################################################################ diff --git a/lldb/test/API/iohandler/resize/TestIOHandlerResizeNoEditline.py b/lldb/test/API/iohandler/resize/TestIOHandlerResizeNoEditline.py index b0ef259fd85f..323e511496cd 100644 --- a/lldb/test/API/iohandler/resize/TestIOHandlerResizeNoEditline.py +++ b/lldb/test/API/iohandler/resize/TestIOHandlerResizeNoEditline.py @@ -14,7 +14,7 @@ def test_resize_no_editline(self): 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) diff --git a/lldb/test/API/iohandler/resize/input_file b/lldb/test/API/iohandler/resize/input_file new file mode 100644 index 000000000000..e69de29bb2d1 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits