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


Python BaselineOptimizer._move_baselines方法代码示例

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


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

示例1: test_move_baselines_skip_scm_commands

# 需要导入模块: from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer [as 别名]
# 或者: from webkitpy.common.checkout.baselineoptimizer.BaselineOptimizer import _move_baselines [as 别名]
 def test_move_baselines_skip_scm_commands(self):
     host = MockHost()
     host.filesystem.write_text_file('/mock-checkout/third_party/WebKit/LayoutTests/VirtualTestSuites', '[]')
     host.filesystem.write_binary_file(
         '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/another/test-expected.txt', 'result A')
     host.filesystem.write_binary_file(
         '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/another/test-expected.txt', 'result A')
     host.filesystem.write_binary_file('/mock-checkout/third_party/WebKit/LayoutTests/another/test-expected.txt', 'result B')
     baseline_optimizer = BaselineOptimizer(host, host.port_factory.get(
     ), host.port_factory.all_port_names())
     baseline_optimizer._move_baselines(
         'another/test-expected.txt',
         {
             '/mock-checkout/third_party/WebKit/LayoutTests/platform/win': 'aaa',
             '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac': 'aaa',
             '/mock-checkout/third_party/WebKit/LayoutTests': 'bbb',
         },
         {
             '/mock-checkout/third_party/WebKit/LayoutTests/platform/linux': 'bbb',
             '/mock-checkout/third_party/WebKit/LayoutTests': 'aaa',
         })
     self.assertEqual(
         host.filesystem.read_binary_file(
             '/mock-checkout/third_party/WebKit/LayoutTests/another/test-expected.txt'),
         'result A')
开发者ID:mirror,项目名称:chromium,代码行数:27,代码来源:baselineoptimizer_unittest.py

示例2: test_move_baselines

# 需要导入模块: from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer [as 别名]
# 或者: from webkitpy.common.checkout.baselineoptimizer.BaselineOptimizer import _move_baselines [as 别名]
 def test_move_baselines(self):
     host = MockHost()
     host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/mac-lion/another/test-expected.txt', 'result A')
     host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/mac-lion-wk2/another/test-expected.txt', 'result A')
     host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/mac/another/test-expected.txt', 'result B')
     baseline_optimizer = BaselineOptimizer(host, host.port_factory.all_port_names())
     baseline_optimizer._move_baselines('another/test-expected.txt', {
         'LayoutTests/platform/mac-lion': 'aaa',
         'LayoutTests/platform/mac-lion-wk2': 'aaa',
         'LayoutTests/platform/mac': 'bbb',
     }, {
         'LayoutTests/platform/mac': 'aaa',
     })
     self.assertEqual(host.filesystem.read_binary_file('/mock-checkout/LayoutTests/platform/mac/another/test-expected.txt'), 'result A')
开发者ID:ZeusbaseWeb,项目名称:webkit,代码行数:16,代码来源:baselineoptimizer_unittest.py

示例3: test_move_baselines

# 需要导入模块: from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer [as 别名]
# 或者: from webkitpy.common.checkout.baselineoptimizer.BaselineOptimizer import _move_baselines [as 别名]
 def test_move_baselines(self):
     host = MockHost(scm=ExcludingMockSCM(['/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/another/test-expected.txt']))
     host.filesystem.write_binary_file('/mock-checkout/third_party/WebKit/LayoutTests/platform/win/another/test-expected.txt', 'result A')
     host.filesystem.write_binary_file('/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/another/test-expected.txt', 'result A')
     host.filesystem.write_binary_file('/mock-checkout/third_party/WebKit/LayoutTests/another/test-expected.txt', 'result B')
     baseline_optimizer = BaselineOptimizer(host, host.port_factory.all_port_names(), skip_scm_commands=False)
     baseline_optimizer._move_baselines('another/test-expected.txt', {
         '/mock-checkout/third_party/WebKit/LayoutTests/platform/win': 'aaa',
         '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac': 'aaa',
         '/mock-checkout/third_party/WebKit/LayoutTests': 'bbb',
     }, {
         '/mock-checkout/third_party/WebKit/LayoutTests': 'aaa',
     })
     self.assertEqual(host.filesystem.read_binary_file('/mock-checkout/third_party/WebKit/LayoutTests/another/test-expected.txt'), 'result A')
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:16,代码来源:baselineoptimizer_unittest.py

示例4: test_move_baselines

# 需要导入模块: from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer [as 别名]
# 或者: from webkitpy.common.checkout.baselineoptimizer.BaselineOptimizer import _move_baselines [as 别名]
 def test_move_baselines(self):
     fs = MockFileSystem()
     fs.write_binary_file("/mock-checkout/LayoutTests/platform/chromium-win/another/test-expected.txt", "result A")
     fs.write_binary_file(
         "/mock-checkout/LayoutTests/platform/chromium-cg-mac/another/test-expected.txt", "result A"
     )
     fs.write_binary_file("/mock-checkout/LayoutTests/platform/chromium/another/test-expected.txt", "result B")
     baseline_optimizer = BaselineOptimizer(MockSCM(), fs)
     baseline_optimizer._move_baselines(
         "another/test-expected.txt",
         {
             "LayoutTests/platform/chromium-win": "aaa",
             "LayoutTests/platform/chromium-cg-mac": "aaa",
             "LayoutTests/platform/chromium": "bbb",
         },
         {"LayoutTests/platform/chromium": "aaa"},
     )
     self.assertEqual(
         fs.read_binary_file("/mock-checkout/LayoutTests/platform/chromium/another/test-expected.txt"), "result A"
     )
开发者ID:nizovn,项目名称:luna-sysmgr,代码行数:22,代码来源:baselineoptimizer_unittest.py


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