示例#1
0
  def testLoggingInitForUsageExamples(self):
    g_log = logging.getLogger("my_example")
    assert isinstance(g_log, logging.Logger)

    with self._redirectLogBase("logging_example", _SAMPLE_CONNECTION_CONTENTS):
      # Test logging init for a tool
      self.assertEqual(LS.initTool(), LS.initLogging(None, console="stderr", logToFile=True))

      # Test logging init for a service
      self.assertEqual(LS.initService(), LS.initLogging(None, console="stderr", logToFile=False))

      # Test logging init for a test app
      self.assertEqual(LS.initTestApp(), LS.initLogging(None, console="stderr", logToFile=False))
示例#2
0
  def testLoggingInitForUsageExamples(self):
    g_log = logging.getLogger("my_example")
    assert isinstance(g_log, logging.Logger)

    with self._redirectLogBase("logging_example", _SAMPLE_CONNECTION_CONTENTS):
      # Test logging init for a tool
      self.assertEqual(LS.initTool(), LS.initLogging(None, console="stderr", logToFile=True))

      # Test logging init for a service
      self.assertEqual(LS.initService(), LS.initLogging(None, console="stderr", logToFile=False))

      # Test logging init for a test app
      self.assertEqual(LS.initTestApp(), LS.initLogging(None, console="stderr", logToFile=False))
示例#3
0
def setUpModule():
    LoggingSupport.initTestApp()
def setUpModule():
  LoggingSupport.initTestApp()
def setUpModule():
  LoggingSupport.initTestApp()

  global g_log  # pylint: disable=W0603
  g_log = getExtendedLogger("custom_datasource_adapter_test")
示例#6
0
def setUpModule():
    LoggingSupport.initTestApp()

    global g_log  # pylint: disable=W0603
    g_log = getExtendedLogger("custom_datasource_adapter_test")