本文整理汇总了Python中UnitTestUtilities.getLoggerName方法的典型用法代码示例。如果您正苦于以下问题:Python UnitTestUtilities.getLoggerName方法的具体用法?Python UnitTestUtilities.getLoggerName怎么用?Python UnitTestUtilities.getLoggerName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnitTestUtilities
的用法示例。
在下文中一共展示了UnitTestUtilities.getLoggerName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import getLoggerName [as 别名]
def main():
''' main test logic '''
if Configuration.DEBUG == True:
print("TestRunner.py - main")
else:
print("Debug messaging is OFF")
# setup logger
logName = None
if not logFileFromBAT == None:
logName = logFileFromBAT
Configuration.Logger = UnitTestUtilities.initializeLogger(logFileFromBAT)
else:
logName = UnitTestUtilities.getLoggerName()
Configuration.Logger = UnitTestUtilities.initializeLogger(logName)
print("Logging results to: " + str(logName))
UnitTestUtilities.setUpLogFileHeader()
result = runTestSuite()
logTestResults(result)
print("END OF TEST =========================================\n")
if result.wasSuccessful():
#tests successful
sys.exit(0)
else:
# test errors or failures
sys.exit(1)
return
示例2: GetLogger
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import getLoggerName [as 别名]
def GetLogger(logLevel = logging.DEBUG) :
global Logger
if Logger is None:
import UnitTestUtilities
logName = UnitTestUtilities.getLoggerName()
Logger = UnitTestUtilities.initializeLogger(logName, logLevel)
return Logger