webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | List of all members
webkitpy.common.system.logtesting.LoggingTestCase Class Reference
Inheritance diagram for webkitpy.common.system.logtesting.LoggingTestCase:
webkitpy.common.net.networktransaction_unittest.NetworkTransactionTest webkitpy.style.checker_unittest.StyleProcessor_CodeCoverageTest webkitpy.style.checker_unittest.StyleProcessor_EndToEndTest webkitpy.style.checker_unittest.StyleProcessorConfigurationTest webkitpy.style.error_handlers_unittest.DefaultStyleErrorHandlerTest webkitpy.style.filereader_unittest.TextFileReaderTest webkitpy.style.optparser_unittest.ArgumentParserTest

Public Member Functions

def setUp (self)
 
def tearDown (self)
 
def logMessages (self)
 
def assertLog (self, messages)
 

Detailed Description

Supports end-to-end unit-testing of log messages.

    Sample usage:

      class SampleTest(LoggingTestCase):

          def test_logging_in_some_method(self):
              call_some_method()  # Contains calls to _log.info(), etc.

              # Check the resulting log messages.
              self.assertLog(["INFO: expected message #1",
                              "WARNING: expected message #2"])

Member Function Documentation

◆ assertLog()

def webkitpy.common.system.logtesting.LoggingTestCase.assertLog (   self,
  messages 
)
Assert the current array of log messages, and clear its contents.

Args:
  messages: A list of log message strings.

◆ logMessages()

def webkitpy.common.system.logtesting.LoggingTestCase.logMessages (   self)
Return the current list of log messages.

◆ setUp()

def webkitpy.common.system.logtesting.LoggingTestCase.setUp (   self)

◆ tearDown()

def webkitpy.common.system.logtesting.LoggingTestCase.tearDown (   self)

The documentation for this class was generated from the following file: