本文整理汇总了Python中model.testfile.TestFile.master方法的典型用法代码示例。如果您正苦于以下问题:Python TestFile.master方法的具体用法?Python TestFile.master怎么用?Python TestFile.master使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model.testfile.TestFile
的用法示例。
在下文中一共展示了TestFile.master方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _get_file
# 需要导入模块: from model.testfile import TestFile [as 别名]
# 或者: from model.testfile.TestFile import master [as 别名]
def _get_file(cls, master, builder, test_type, filename):
files = TestFile.get_files(master, builder, test_type, filename)
if files:
return files[0]
file = TestFile()
file.master = master
file.builder = builder
file.test_type = test_type
file.name = filename
file.data = ""
return file
示例2: update_file
# 需要导入模块: from model.testfile import TestFile [as 别名]
# 或者: from model.testfile.TestFile import master [as 别名]
def update_file(cls, master, builder, test_type, incremental, filename, num_runs):
files = TestFile.get_files(master, builder, test_type, filename)
if files:
file = files[0]
new_results = cls.merge(builder, file.data, incremental, num_runs)
else:
# Use the incremental data if there is no aggregated file to merge.
file = TestFile()
file.master = master
file.builder = builder
file.test_type = test_type
file.name = filename
new_results = incremental
logging.info("No existing json results, incremental json is saved.")
if not new_results or not file.save(new_results):
logging.info("Update failed, master: %s, builder: %s, test_type: %s, name: %s." % (master, builder, test_type, filename))
return False
return True