当前位置: 首页>>代码示例>>Python>>正文


Python layouttestresults.LayoutTestResults类代码示例

本文整理汇总了Python中webkitpy.common.net.layouttestresults.LayoutTestResults的典型用法代码示例。如果您正苦于以下问题:Python LayoutTestResults类的具体用法?Python LayoutTestResults怎么用?Python LayoutTestResults使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了LayoutTestResults类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_results

 def test_results(self):
     # Doesn't make sense to ask for the test_results until the tests have run at least once.
     assert(self._test_run_counter >= 0)
     failures_for_run = self._test_failure_plan[self._test_run_counter]
     results = LayoutTestResults(map(self._mock_test_result, failures_for_run))
     # This makes the results trustable by ExpectedFailures.
     results.set_failure_limit_count(10)
     return results
开发者ID:3163504123,项目名称:phantomjs,代码行数:8,代码来源:commitqueuetask_unittest.py

示例2: test_was_interrupted

 def test_was_interrupted(self):
     self.assertTrue(
         LayoutTestResults.results_from_string('ADD_RESULTS({"tests":{},"interrupted":true});').run_was_interrupted()
     )
     self.assertFalse(
         LayoutTestResults.results_from_string(
             'ADD_RESULTS({"tests":{},"interrupted":false});'
         ).run_was_interrupted()
     )
开发者ID:xar369,项目名称:chromium,代码行数:9,代码来源:layouttestresults_unittest.py

示例3: builder_data

        def builder_data():
            old_builder_data()
            # have prototype-chocolate only fail on "MOCK Leopard".
            self.command._builder_data['MOCK SnowLeopard'] = LayoutTestResults.results_from_string("""ADD_RESULTS({
    "tests": {
        "fast": {
            "dom": {
                "prototype-taco.html": {
                    "expected": "PASS",
                    "actual": "PASS TEXT",
                    "is_unexpected": true
                },
                "prototype-chocolate.html": {
                    "expected": "FAIL",
                    "actual": "PASS"
                },
                "prototype-strawberry.html": {
                    "expected": "PASS",
                    "actual": "IMAGE PASS",
                    "is_unexpected": true
                }
            }
        }
    }
});""")
            return self.command._builder_data
开发者ID:,项目名称:,代码行数:26,代码来源:

示例4: test_parse_layout_test_results

    def test_parse_layout_test_results(self):
        failures = [test_failures.FailureMissingResult(), test_failures.FailureMissingImageHash(), test_failures.FailureMissingImage()]
        testname = 'fast/repaint/no-caret-repaint-in-non-content-editable-element.html'
        expected_results = [test_results.TestResult(testname, failures)]

        results = LayoutTestResults._parse_results_html(self._example_results_html)
        self.assertEqual(expected_results, results)
开发者ID:0x4d52,项目名称:JavaScriptCore-X,代码行数:7,代码来源:layouttestresults_unittest.py

示例5: fetch_layout_test_results

    def fetch_layout_test_results(self, results_url):
        # FIXME: This should cache that the result was a 404 and stop hitting the network.
        results_file = NetworkTransaction(convert_404_to_None=True).run(lambda: self._fetch_file_from_results(results_url, "full_results.json"))
        if not results_file:
            results_file = NetworkTransaction(convert_404_to_None=True).run(lambda: self._fetch_file_from_results(results_url, "results.html"))

        # results_from_string accepts either ORWT html or NRWT json.
        return LayoutTestResults.results_from_string(results_file)
开发者ID:EQ4,项目名称:h5vcc,代码行数:8,代码来源:buildbot.py

示例6: fetch_layout_test_results

 def fetch_layout_test_results(self, results_url):
     """Returns a LayoutTestResults object for results fetched from a given URL."""
     results_file = NetworkTransaction(convert_404_to_None=True).run(
         lambda: self._fetch_file(results_url, "failing_results.json"))
     revision = NetworkTransaction(convert_404_to_None=True).run(
         lambda: self._fetch_file(results_url, "LAST_CHANGE"))
     if not revision:
         results_file = None
     return LayoutTestResults.results_from_string(results_file, revision)
开发者ID:mirror,项目名称:chromium,代码行数:9,代码来源:buildbot.py

示例7: test_unexpected_mismatch_results

 def test_unexpected_mismatch_results(self):
     results = LayoutTestResults.results_from_string(self.example_full_results_json)
     self.assertEqual(
         [r.test_name() for r in results.unexpected_mismatch_results()],
         [
             'fast/dom/prototype-inheritance.html',
             'fast/dom/prototype-taco.html',
             'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html'
         ])
开发者ID:ollie314,项目名称:chromium,代码行数:9,代码来源:layouttestresults_unittest.py

示例8: test_didnt_run_as_expected_results

 def test_didnt_run_as_expected_results(self):
     results = LayoutTestResults.results_from_string(self.example_full_results_json)
     self.assertEqual(
         [r.test_name() for r in results.didnt_run_as_expected_results()],
         [
             'fast/dom/prototype-banana.html',
             'fast/dom/prototype-crashy.html',
             'fast/dom/prototype-inheritance.html',
             'fast/dom/prototype-newtest.html',
             'fast/dom/prototype-strawberry.html',
             'fast/dom/prototype-taco.html',
             'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html',
         ])
开发者ID:mirror,项目名称:chromium,代码行数:13,代码来源:layouttestresults_unittest.py

示例9: _setup_mock_builder_data

    def _setup_mock_builder_data(self):
        data = LayoutTestResults.results_from_string("""ADD_RESULTS({
    "tests": {
        "userscripts": {
            "first-test.html": {
                "expected": "PASS",
                "actual": "IMAGE+TEXT"
            },
            "second-test.html": {
                "expected": "FAIL",
                "actual": "IMAGE+TEXT"
            }
        }
    }
});""")
        for builder in ['MOCK builder', 'MOCK builder (Debug)', 'WebKit Mac10.7']:
            self.command._builder_data[builder] = data
开发者ID:,项目名称:,代码行数:17,代码来源:

示例10: test_results_from_string

 def test_results_from_string(self):
     self.assertIsNone(LayoutTestResults.results_from_string(None))
     self.assertIsNone(LayoutTestResults.results_from_string(""))
开发者ID:mirror,项目名称:chromium,代码行数:3,代码来源:layouttestresults_unittest.py

示例11: _create_layout_test_results

 def _create_layout_test_results(self):
     results_path = self._tool.port().layout_tests_results_path()
     results_html = self._read_file_contents(results_path)
     if not results_html:
         return None
     return LayoutTestResults.results_from_string(results_html)
开发者ID:Andolamin,项目名称:LunaSysMgr,代码行数:6,代码来源:layouttestresultsreader.py

示例12: test_results_from_string

 def test_results_from_string(self):
     self.assertEqual(LayoutTestResults.results_from_string(None), None)
     self.assertEqual(LayoutTestResults.results_from_string(""), None)
开发者ID:,项目名称:,代码行数:3,代码来源:

示例13: layout_test_results

 def layout_test_results(self):
     if not self._layout_test_results:
         # FIXME: This should cache that the result was a 404 and stop hitting the network.
         self._layout_test_results = LayoutTestResults.results_from_string(self._fetch_results_html())
     return self._layout_test_results
开发者ID:,项目名称:,代码行数:5,代码来源:

示例14: latest_layout_test_results

 def latest_layout_test_results(self):
     return LayoutTestResults.results_from_string(layouttestresults_unittest.LayoutTestResultsTest.example_full_results_json)
开发者ID:335969568,项目名称:Blink-1,代码行数:2,代码来源:buildbot_mock.py

示例15: test_missing_baseline

 def test_missing_baseline(self):
     results = LayoutTestResults.results_from_string(self.example_full_results_json)
     missing_results = results.missing_results()
     self.assertEqual(len(missing_results), 1)
     self.assertEqual(missing_results[0].test_name(), "fast/dom/prototype-newtest.html")
开发者ID:ollie314,项目名称:chromium,代码行数:5,代码来源:layouttestresults_unittest.py


注:本文中的webkitpy.common.net.layouttestresults.LayoutTestResults类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。