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


Python TestExpectationParser.tokenize_list方法代码示例

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


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

示例1: execute

# 需要导入模块: from webkitpy.layout_tests.models.test_expectations import TestExpectationParser [as 别名]
# 或者: from webkitpy.layout_tests.models.test_expectations.TestExpectationParser import tokenize_list [as 别名]
 def execute(self, options, args, tool):
     port = factory.get("chromium-win-win7")  # FIXME: This should be selectable.
     expectation_lines = TestExpectationParser.tokenize_list(port.test_expectations())
     parser = TestExpectationParser(port, [], allow_rebaseline_modifier=False)
     for expectation_line in expectation_lines:
         parser.parse(expectation_line)
     converter = TestConfigurationConverter(port.all_test_configurations(), port.configuration_specifier_macros())
     tool.filesystem.write_text_file(port.path_to_test_expectations_file(), TestExpectationSerializer.list_to_string(expectation_lines, converter))
开发者ID:Andolamin,项目名称:LunaSysMgr,代码行数:10,代码来源:expectations.py

示例2: update_expectations

# 需要导入模块: from webkitpy.layout_tests.models.test_expectations import TestExpectationParser [as 别名]
# 或者: from webkitpy.layout_tests.models.test_expectations.TestExpectationParser import tokenize_list [as 别名]
 def update_expectations(self, failure_info_list):
     expectation_lines = TestExpectationParser.tokenize_list(self._tool.filesystem.read_text_file(self._path_to_test_expectations_file))
     for expectation_line in expectation_lines:
         self._parser.parse(expectation_line)
     editor = TestExpectationsEditor(expectation_lines, self)
     updated_expectation_lines = []
     # FIXME: Group failures by testName+failureTypeList.
     for failure_info in failure_info_list:
         expectation_set = set(filter(lambda expectation: expectation is not None,
                                      map(TestExpectations.expectation_from_string, failure_info['failureTypeList'])))
         assert(expectation_set)
         test_name = failure_info['testName']
         assert(test_name)
         builder_name = failure_info['builderName']
         affected_test_configuration_set = self._extrapolator.extrapolate_test_configurations(builder_name)
         updated_expectation_lines.extend(editor.update_expectation(test_name, affected_test_configuration_set, expectation_set))
     self._tool.filesystem.write_text_file(self._path_to_test_expectations_file, TestExpectationSerializer.list_to_string(expectation_lines, self._converter, reconstitute_only_these=updated_expectation_lines))
开发者ID:jboylee,项目名称:preprocessor-parser,代码行数:19,代码来源:gardeningserver.py


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