本文整理汇总了Python中webkitpy.layout_tests.port.test.TestPort.create_driver方法的典型用法代码示例。如果您正苦于以下问题:Python TestPort.create_driver方法的具体用法?Python TestPort.create_driver怎么用?Python TestPort.create_driver使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webkitpy.layout_tests.port.test.TestPort
的用法示例。
在下文中一共展示了TestPort.create_driver方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_runner
# 需要导入模块: from webkitpy.layout_tests.port.test import TestPort [as 别名]
# 或者: from webkitpy.layout_tests.port.test.TestPort import create_driver [as 别名]
def create_runner(self, buildbot_output=None, args=[], regular_output=None, driver_class=TestDriver):
buildbot_output = buildbot_output or array_stream.ArrayStream()
regular_output = regular_output or array_stream.ArrayStream()
options, parsed_args = PerfTestsRunner._parse_args(args)
test_port = TestPort(host=MockHost(), options=options)
test_port.create_driver = lambda worker_number=None, no_timeout=False: driver_class()
runner = PerfTestsRunner(regular_output, buildbot_output, args=args, port=test_port)
runner._host.filesystem.maybe_make_directory(runner._base_path, 'inspector')
runner._host.filesystem.maybe_make_directory(runner._base_path, 'Bindings')
runner._host.filesystem.maybe_make_directory(runner._base_path, 'Parser')
return runner
示例2: create_runner
# 需要导入模块: from webkitpy.layout_tests.port.test import TestPort [as 别名]
# 或者: from webkitpy.layout_tests.port.test.TestPort import create_driver [as 别名]
def create_runner(self, args=[], driver_class=TestDriver):
options, parsed_args = PerfTestsRunner._parse_args(args)
test_port = TestPort(host=MockHost(), options=options)
test_port.create_driver = lambda worker_number=None, no_timeout=False: driver_class()
runner = PerfTestsRunner(args=args, port=test_port)
runner._host.filesystem.maybe_make_directory(runner._base_path, "inspector")
runner._host.filesystem.maybe_make_directory(runner._base_path, "Bindings")
runner._host.filesystem.maybe_make_directory(runner._base_path, "Parser")
filesystem = runner._host.filesystem
runner.load_output_json = lambda: json.loads(filesystem.read_text_file(runner._output_json_path()))
return runner, test_port