[Lldb-commits] [lldb] r257931 - Small 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 12:45:07 PST 2016
Author: amccarth
Date: Fri Jan 15 14:45:06 2016
New Revision: 257931
URL: http://llvm.org/viewvc/llvm-project?rev=257931&view=rev
Log:
Small fixes to ensure TestLogging.py tests work with Python 3.5 as well as 2.7.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/logging/TestLogging.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/logging/TestLogging.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/logging/TestLogging.py?rev=257931&r1=257930&r2=257931&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/logging/TestLogging.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/logging/TestLogging.py Fri Jan 15 14:45:06 2016
@@ -61,7 +61,7 @@ class LogTestCase(TestBase):
f.close ()
os.remove (log_file)
- self.assertTrue(log_lines > 0, "Something was written to the log file.")
+ self.assertGreater(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 @@ class LogTestCase(TestBase):
contents = f.read ()
# check that it got removed
- self.assertTrue(string.find(contents, "bacon") == -1)
+ self.assertEquals(contents.find("bacon"), -1)
# Check that lldb can append to a log file
@no_debug_info_test
@@ -104,4 +104,4 @@ class LogTestCase(TestBase):
contents = f.read ()
# check that it is still there
- self.assertTrue(string.find(contents, "bacon") == 0)
+ self.assertEquals(contents.find("bacon"), 0)
More information about the lldb-commits
mailing list