本文整理汇总了Python中webkitpy.layout_tests.port.Port.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Port.__init__方法的具体用法?Python Port.__init__怎么用?Python Port.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webkitpy.layout_tests.port.Port
的用法示例。
在下文中一共展示了Port.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from webkitpy.layout_tests.port import Port [as 别名]
# 或者: from webkitpy.layout_tests.port.Port import __init__ [as 别名]
def __init__(self, host=None, port_name=None, **kwargs):
if not port_name or port_name == 'test':
port_name = 'test-mac-leopard'
host = host or MockHost()
filesystem = self._set_default_overriding_none(kwargs, 'filesystem', unit_test_filesystem())
Port.__init__(self, host, port_name=port_name, **kwargs)
self._results_directory = None
assert filesystem._tests
self._tests = filesystem._tests
self._operating_system = 'mac'
if port_name.startswith('test-win'):
self._operating_system = 'win'
elif port_name.startswith('test-linux'):
self._operating_system = 'linux'
version_map = {
'test-win-xp': 'xp',
'test-win-win7': 'win7',
'test-win-vista': 'vista',
'test-mac-leopard': 'leopard',
'test-mac-snowleopard': 'snowleopard',
'test-linux-x86_64': 'lucid',
}
self._version = version_map[port_name]
self._expectations_path = LAYOUT_TEST_DIR + '/platform/test/test_expectations.txt'
示例2: __init__
# 需要导入模块: from webkitpy.layout_tests.port import Port [as 别名]
# 或者: from webkitpy.layout_tests.port.Port import __init__ [as 别名]
def __init__(self, host, port_name=None, **kwargs):
Port.__init__(self, host, port_name or TestPort.default_port_name, **kwargs)
self._tests = unit_test_list()
self._flakes = set()
# FIXME: crbug.com/279494. This needs to be in the "real layout tests
# dir" in a mock filesystem, rather than outside of the checkout, so
# that tests that want to write to a TestExpectations file can share
# this between "test" ports and "real" ports. This is the result of
# rebaseline_unittest.py having tests that refer to "real" port names
# and real builders instead of fake builders that point back to the
# test ports. rebaseline_unittest.py needs to not mix both "real" ports
# and "test" ports
self._generic_expectations_path = '/mock-checkout/LayoutTests/TestExpectations'
self._results_directory = None
self._operating_system = 'mac'
if self._name.startswith('test-win'):
self._operating_system = 'win'
elif self._name.startswith('test-linux'):
self._operating_system = 'linux'
version_map = {
'test-win-xp': 'xp',
'test-win-win7': 'win7',
'test-mac-leopard': 'leopard',
'test-mac-snowleopard': 'snowleopard',
'test-linux-x86_64': 'lucid',
}
self._version = version_map[self._name]
示例3: __init__
# 需要导入模块: from webkitpy.layout_tests.port import Port [as 别名]
# 或者: from webkitpy.layout_tests.port.Port import __init__ [as 别名]
def __init__(self, host, port_name=None, **kwargs):
# FIXME: Consider updating all of the callers to pass in a port_name so it can be a
# required parameter like all of the other Port objects.
port_name = port_name or 'test-mac-leopard'
Port.__init__(self, host, port_name, **kwargs)
self._tests = unit_test_list()
self._flakes = set()
self._expectations_path = LAYOUT_TEST_DIR + '/platform/test/TestExpectations'
self._results_directory = None
self._operating_system = 'mac'
if port_name.startswith('test-win'):
self._operating_system = 'win'
elif port_name.startswith('test-linux'):
self._operating_system = 'linux'
version_map = {
'test-win-xp': 'xp',
'test-win-win7': 'win7',
'test-win-vista': 'vista',
'test-mac-leopard': 'leopard',
'test-mac-snowleopard': 'snowleopard',
'test-linux-x86_64': 'lucid',
}
self._version = version_map[port_name]
示例4: __init__
# 需要导入模块: from webkitpy.layout_tests.port import Port [as 别名]
# 或者: from webkitpy.layout_tests.port.Port import __init__ [as 别名]
def __init__(self, port_name=None, user=None, filesystem=None, **kwargs):
if not port_name or port_name == 'test':
port_name = 'test-mac-leopard'
user = user or mocktool.MockUser()
filesystem = filesystem or unit_test_filesystem()
Port.__init__(self, port_name=port_name, filesystem=filesystem, user=user, **kwargs)
self._results_directory = None
assert filesystem._tests
self._tests = filesystem._tests
self._operating_system = 'mac'
if port_name.startswith('test-win'):
self._operating_system = 'win'
elif port_name.startswith('test-linux'):
self._operating_system = 'linux'
version_map = {
'test-win-xp': 'xp',
'test-win-win7': 'win7',
'test-win-vista': 'vista',
'test-mac-leopard': 'leopard',
'test-mac-snowleopard': 'snowleopard',
'test-linux-x86_64': 'lucid',
}
self._version = version_map[port_name]
self._expectations_path = LAYOUT_TEST_DIR + '/platform/test/test_expectations.txt'
示例5: __init__
# 需要导入模块: from webkitpy.layout_tests.port import Port [as 别名]
# 或者: from webkitpy.layout_tests.port.Port import __init__ [as 别名]
def __init__(self, host, port_name=None, **kwargs):
Port.__init__(self, host, port_name or TestPort.default_port_name, **kwargs)
self._tests = unit_test_list()
self._flakes = set()
self._generic_expectations_path = LAYOUT_TEST_DIR + '/TestExpectations'
self._results_directory = None
self._operating_system = 'mac'
if self._name.startswith('test-win'):
self._operating_system = 'win'
elif self._name.startswith('test-linux'):
self._operating_system = 'linux'
version_map = {
'test-win-xp': 'xp',
'test-win-win7': 'win7',
'test-mac-leopard': 'leopard',
'test-mac-snowleopard': 'snowleopard',
'test-linux-x86_64': 'lucid',
}
self._version = version_map[self._name]