本文整理汇总了Python中webkitpy.common.host_mock.MockHost.layout_tests_dir方法的典型用法代码示例。如果您正苦于以下问题:Python MockHost.layout_tests_dir方法的具体用法?Python MockHost.layout_tests_dir怎么用?Python MockHost.layout_tests_dir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webkitpy.common.host_mock.MockHost
的用法示例。
在下文中一共展示了MockHost.layout_tests_dir方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: check
# 需要导入模块: from webkitpy.common.host_mock import MockHost [as 别名]
# 或者: from webkitpy.common.host_mock.MockHost import layout_tests_dir [as 别名]
def check(self, expectations, overrides, skips, lint=False):
port = MockHost().port_factory.get('qt')
port._filesystem.write_text_file(port._filesystem.join(port.layout_tests_dir(), 'failures/expected/text.html'), 'foo')
exp = TestExpectations(port, tests=['failures/expected/text.html'],
expectations=expectations, overrides=overrides, is_lint_mode=lint,
test_config=port.test_configuration(), skipped_tests=set(skips))
# Check that the expectation is for BUG_DUMMY SKIP : ... = PASS
self.assertEquals(exp.get_modifiers('failures/expected/text.html'),
[TestExpectationParser.DUMMY_BUG_MODIFIER, TestExpectationParser.SKIP_MODIFIER])
self.assertEquals(exp.get_expectations('failures/expected/text.html'), set([PASS]))
示例2: check
# 需要导入模块: from webkitpy.common.host_mock import MockHost [as 别名]
# 或者: from webkitpy.common.host_mock.MockHost import layout_tests_dir [as 别名]
def check(self, expectations, overrides, skips, lint=False, expected_results=[WONTFIX, SKIP, FAIL]):
port = MockHost().port_factory.get('test-win-xp')
port._filesystem.write_text_file(port._filesystem.join(port.layout_tests_dir(), 'failures/expected/text.html'), 'foo')
expectations_dict = OrderedDict()
expectations_dict['expectations'] = expectations
if overrides:
expectations_dict['overrides'] = overrides
port.expectations_dict = lambda: expectations_dict
port.skipped_layout_tests = lambda tests: set(skips)
expectations_to_lint = expectations_dict if lint else None
exp = TestExpectations(port, ['failures/expected/text.html'], expectations_dict=expectations_to_lint, is_lint_mode=lint)
self.assertEqual(exp.get_expectations('failures/expected/text.html'), set(expected_results))