def testPkbLogFilterNoContext(self):
    self.completed = False

    def childLog():
      logger_name = 'log_util_test.LogUtilTestCase.testPkbLogFilterNoContext'
      self.log_record = logging.LogRecord(
          name=logger_name, level=logging.INFO, pathname=__file__,
          lineno=inspect.getframeinfo(inspect.currentframe()).lineno + 1,
          msg="Log message.", args=None, exc_info=None)
      log_util.PkbLogFilter().filter(self.log_record)
      self.completed = True
    child = threading.Thread(target=childLog)
    child.start()
    child.join()
    self.assertTrue(self.completed)
    self.assertEqual(self.log_record.pkb_label, '')
Verify that PkbLogFilter works if no context was set.
dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/tests/log_util_test.py/LogUtilTestCase.testPkbLogFilterNoContext