[Lldb-commits] [PATCH] D16237: Fixes to ensure TestLogging.py tests work with Python 3.5 as well as 2.7.
Adrian McCarthy via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 15 11:57:15 PST 2016
amccarth created this revision.
amccarth added a reviewer: zturner.
amccarth added a subscriber: lldb-commits.
Tested on Windows with Python 3.5.
http://reviews.llvm.org/D16237
Files:
packages/Python/lldbsuite/test/logging/TestLogging.py
Index: packages/Python/lldbsuite/test/logging/TestLogging.py
===================================================================
--- packages/Python/lldbsuite/test/logging/TestLogging.py
+++ packages/Python/lldbsuite/test/logging/TestLogging.py
@@ -61,7 +61,7 @@
f.close ()
os.remove (log_file)
- self.assertTrue(log_lines > 0, "Something was written to the log file.")
+ self.assertTrue(len(log_lines) > 0, "Something was written to the log file.")
# Check that lldb truncates its log files
@no_debug_info_test
@@ -83,7 +83,7 @@
contents = f.read ()
# check that it got removed
- self.assertTrue(string.find(contents, "bacon") == -1)
+ self.assertTrue(contents.find("bacon") == -1)
# Check that lldb can append to a log file
@no_debug_info_test
@@ -104,4 +104,4 @@
contents = f.read ()
# check that it is still there
- self.assertTrue(string.find(contents, "bacon") == 0)
+ self.assertTrue(contents.find("bacon") == 0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16237.45019.patch
Type: text/x-patch
Size: 1054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160115/612107fa/attachment-0001.bin>
More information about the lldb-commits
mailing list