summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/logging/TestLogging.py
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2016-01-15 20:45:06 +0000
committerAdrian McCarthy <amccarth@google.com>2016-01-15 20:45:06 +0000
commit8801145ad4f4da063add09a8337784a89b7ff1d0 (patch)
treeb4f840797afffe904cc55b3472a1e12d19034d05 /lldb/packages/Python/lldbsuite/test/logging/TestLogging.py
parente5f807f92860d4fea483d42b6f2c6273b456a778 (diff)
downloadbcm5719-llvm-8801145ad4f4da063add09a8337784a89b7ff1d0.tar.gz
bcm5719-llvm-8801145ad4f4da063add09a8337784a89b7ff1d0.zip
Small fixes to ensure TestLogging.py tests work with Python 3.5 as well as 2.7.
llvm-svn: 257931
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/logging/TestLogging.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/logging/TestLogging.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/logging/TestLogging.py b/lldb/packages/Python/lldbsuite/test/logging/TestLogging.py
index f8558a758ee..cb42877c11e 100644
--- a/lldb/packages/Python/lldbsuite/test/logging/TestLogging.py
+++ b/lldb/packages/Python/lldbsuite/test/logging/TestLogging.py
@@ -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)
OpenPOWER on IntegriCloud