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


Python Port._parse_reftest_list方法代码示例

本文整理汇总了Python中webkitpy.layout_tests.port.Port._parse_reftest_list方法的典型用法代码示例。如果您正苦于以下问题:Python Port._parse_reftest_list方法的具体用法?Python Port._parse_reftest_list怎么用?Python Port._parse_reftest_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在webkitpy.layout_tests.port.Port的用法示例。


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

示例1: test_parse_reftest_list

# 需要导入模块: from webkitpy.layout_tests.port import Port [as 别名]
# 或者: from webkitpy.layout_tests.port.Port import _parse_reftest_list [as 别名]
    def test_parse_reftest_list(self):
        port = self.make_port(with_tests=True)
        port.host.filesystem.files["bar/reftest.list"] = "\n".join(
            [
                "== test.html test-ref.html",
                "",
                "# some comment",
                "!= test-2.html test-notref.html # more comments",
                "== test-3.html test-ref.html",
                "== test-3.html test-ref2.html",
                "!= test-3.html test-notref.html",
            ]
        )

        reftest_list = Port._parse_reftest_list(port.host.filesystem, "bar")
        self.assertEqual(
            reftest_list,
            {
                "bar/test.html": [("==", "bar/test-ref.html")],
                "bar/test-2.html": [("!=", "bar/test-notref.html")],
                "bar/test-3.html": [
                    ("==", "bar/test-ref.html"),
                    ("==", "bar/test-ref2.html"),
                    ("!=", "bar/test-notref.html"),
                ],
            },
        )
开发者ID:twnin,项目名称:webkit,代码行数:29,代码来源:base_unittest.py

示例2: test_parse_reftest_list

# 需要导入模块: from webkitpy.layout_tests.port import Port [as 别名]
# 或者: from webkitpy.layout_tests.port.Port import _parse_reftest_list [as 别名]
    def test_parse_reftest_list(self):
        port = self.make_port(with_tests=True)
        port.host.filesystem.files['bar/reftest.list'] = "\n".join(["== test.html test-ref.html",
        "",
        "# some comment",
        "!= test-2.html test-notref.html # more comments",
        "== test-3.html test-ref.html",
        "== test-3.html test-ref2.html",
        "!= test-3.html test-notref.html"])

        reftest_list = Port._parse_reftest_list(port.host.filesystem, 'bar')
        self.assertEqual(reftest_list, {'bar/test.html': [('==', 'bar/test-ref.html')],
            'bar/test-2.html': [('!=', 'bar/test-notref.html')],
            'bar/test-3.html': [('==', 'bar/test-ref.html'), ('==', 'bar/test-ref2.html'), ('!=', 'bar/test-notref.html')]})
开发者ID:Moondee,项目名称:Artemis,代码行数:16,代码来源:base_unittest.py

示例3: test_parse_reftest_list

# 需要导入模块: from webkitpy.layout_tests.port import Port [as 别名]
# 或者: from webkitpy.layout_tests.port.Port import _parse_reftest_list [as 别名]
    def test_parse_reftest_list(self):
        port = self.make_port(with_tests=True)
        port.host.filesystem.files['bar/reftest.list'] = "\n".join(["== test.html test-ref.html",
        "",
        "# some comment",
        "!= test-2.html test-notref.html # more comments",
        "== test-3.html test-ref.html",
        "== test-3.html test-ref2.html",
        "!= test-3.html test-notref.html",
        "fuzzy(80,500) == test-3 test-ref.html"])

        # Note that we don't support the syntax in the last line; the code should ignore it, rather than crashing.

        reftest_list = Port._parse_reftest_list(port.host.filesystem, 'bar')
        self.assertEqual(reftest_list, {'bar/test.html': [('==', 'bar/test-ref.html')],
            'bar/test-2.html': [('!=', 'bar/test-notref.html')],
            'bar/test-3.html': [('==', 'bar/test-ref.html'), ('==', 'bar/test-ref2.html'), ('!=', 'bar/test-notref.html')]})
开发者ID:smil-in-javascript,项目名称:blink,代码行数:19,代码来源:base_unittest.py


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