diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
commit | f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 (patch) | |
tree | 48d008fd3df8c0e73271a4b18474e0aac6dbfe33 /packages/Python/lldbsuite/test/logging/TestLogging.py | |
parent | 2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (diff) |
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/logging/TestLogging.py')
-rw-r--r-- | packages/Python/lldbsuite/test/logging/TestLogging.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/Python/lldbsuite/test/logging/TestLogging.py b/packages/Python/lldbsuite/test/logging/TestLogging.py index f8558a758ee9d..cba587e5d8a03 100644 --- a/packages/Python/lldbsuite/test/logging/TestLogging.py +++ b/packages/Python/lldbsuite/test/logging/TestLogging.py @@ -8,7 +8,9 @@ from __future__ import print_function import os, time, string import lldb +from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil class LogTestCase(TestBase): @@ -61,7 +63,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 +85,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 +106,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) |