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