summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py')
-rw-r--r--lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
index 660f463ee90..051063bf4ec 100644
--- a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
+++ b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
@@ -2,6 +2,8 @@
Test lldb breakpoint command add/list/delete.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
@@ -50,7 +52,7 @@ class BreakpointCommandTestCase(TestBase):
# Now add callbacks for the breakpoints just created.
self.runCmd("breakpoint command add -s command -o 'frame variable --show-types --scope' 1 4")
- self.runCmd("breakpoint command add -s python -o 'here = open(\"output.txt\", \"w\"); print >> here, \"lldb\"; here.close()' 2")
+ self.runCmd("breakpoint command add -s python -o 'here = open(\"output.txt\", \"w\"); print(\"lldb\", file=here); here.close()' 2")
self.runCmd("breakpoint command add --python-function bktptcmd.function 3")
# Check that the breakpoint commands are correctly set.
@@ -72,7 +74,7 @@ class BreakpointCommandTestCase(TestBase):
self.expect("breakpoint command list 2", "Breakpoint 2 command ok",
substrs = ["Breakpoint commands:",
"here = open",
- "print >> here",
+ "print(file=here)",
"here.close()"])
self.expect("breakpoint command list 3", "Breakpoint 3 command ok",
substrs = ["Breakpoint commands:",
@@ -176,7 +178,7 @@ class BreakpointCommandTestCase(TestBase):
lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
# Now add callbacks for the breakpoints just created.
- self.runCmd("breakpoint command add -s python -o 'here = open(\"output-2.txt\", \"w\"); print >> here, frame; print >> here, bp_loc; here.close()' 1")
+ self.runCmd("breakpoint command add -s python -o 'here = open(\"output-2.txt\", \"w\"); print(frame, file=here); print(bp_loc, file=here); here.close()' 1")
# Remove 'output-2.txt' if it already exists.
OpenPOWER on IntegriCloud