當前位置: 首頁>>代碼示例>>Python>>正文


Python TestFile.get_files方法代碼示例

本文整理匯總了Python中model.testfile.TestFile.get_files方法的典型用法代碼示例。如果您正苦於以下問題:Python TestFile.get_files方法的具體用法?Python TestFile.get_files怎麽用?Python TestFile.get_files使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在model.testfile.TestFile的用法示例。


在下文中一共展示了TestFile.get_files方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _get_file

# 需要導入模塊: from model.testfile import TestFile [as 別名]
# 或者: from model.testfile.TestFile import get_files [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
開發者ID:hinike,項目名稱:opera,代碼行數:14,代碼來源:jsonresults.py

示例2: _get_file_content

# 需要導入模塊: from model.testfile import TestFile [as 別名]
# 或者: from model.testfile.TestFile import get_files [as 別名]
    def _get_file_content(self, master, builder, test_type, build_number, name):
        """Return content of the file that matches builder and file name.

        Args:
            builder: builder name
            test_type: type of the test
            build_number: build number, or 'latest'
            name: file name
        """

        files = TestFile.get_files(
            master, builder, test_type, build_number, name, load_data=True, limit=1)
        if not files:
            logging.info("File not found, master %s, builder: %s, test_type: %s, build_number: %s, name: %s.",
                         master, builder, test_type, build_number, name)
            return None, None

        return files[0].data, files[0].date
開發者ID:darktears,項目名稱:blink-crosswalk,代碼行數:20,代碼來源:testfilehandler.py

示例3: update_file

# 需要導入模塊: from model.testfile import TestFile [as 別名]
# 或者: from model.testfile.TestFile import get_files [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
開發者ID:dzhshf,項目名稱:WebKit,代碼行數:22,代碼來源:jsonresults.py


注:本文中的model.testfile.TestFile.get_files方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。