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


Python MockOptions.non_interactive方法代码示例

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


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

示例1: _test_check_test_expectations

# 需要导入模块: from webkitpy.tool.mocktool import MockOptions [as 别名]
# 或者: from webkitpy.tool.mocktool.MockOptions import non_interactive [as 别名]
    def _test_check_test_expectations(self, filename):
        capture = OutputCapture()
        options = MockOptions()
        options.git_commit = ""
        options.non_interactive = True

        tool = MockTool()
        tool.user = None  # Will cause any access of tool.user to raise an exception.
        step = Commit(tool, options)
        state = {
            "changed_files": [filename + "XXX"],
        }

        tool.executive = MockExecutive(should_log=True, should_throw_when_run=False)
        expected_logs = "Committed r49824: <http://trac.webkit.org/changeset/49824>\n"
        capture.assert_outputs(self, step.run, [state], expected_logs=expected_logs)

        state = {
            "changed_files": ["platform/chromium/" + filename],
        }
        expected_logs = """MOCK run_and_throw_if_fail: ['mock-check-webkit-style', '--diff-files', 'platform/chromium/%s'], cwd=/mock-checkout
Committed r49824: <http://trac.webkit.org/changeset/49824>
""" % filename
        capture.assert_outputs(self, step.run, [state], expected_logs=expected_logs)

        tool.executive = MockExecutive(should_log=True, should_throw_when_run=set(["platform/chromium/" + filename]))
        self.assertRaises(ScriptError, capture.assert_outputs, self, step.run, [state])
开发者ID:,项目名称:,代码行数:29,代码来源:

示例2: _step_options

# 需要导入模块: from webkitpy.tool.mocktool import MockOptions [as 别名]
# 或者: from webkitpy.tool.mocktool.MockOptions import non_interactive [as 别名]
 def _step_options(self):
     options = MockOptions()
     options.non_interactive = True
     options.port = 'MOCK port'
     options.quiet = True
     options.test = True
     return options
开发者ID:KDE,项目名称:android-qtwebkit,代码行数:9,代码来源:steps_unittest.py

示例3: _default_options

# 需要导入模块: from webkitpy.tool.mocktool import MockOptions [as 别名]
# 或者: from webkitpy.tool.mocktool.MockOptions import non_interactive [as 别名]
 def _default_options(self):
     options = MockOptions()
     options.force_clean = False
     options.clean = True
     options.check_builders = True
     options.quiet = False
     options.non_interactive = False
     options.update = True
     options.build = True
     options.test = True
     options.close_bug = True
     return options
开发者ID:,项目名称:,代码行数:14,代码来源:

示例4: _default_options

# 需要导入模块: from webkitpy.tool.mocktool import MockOptions [as 别名]
# 或者: from webkitpy.tool.mocktool.MockOptions import non_interactive [as 别名]
 def _default_options(self):
     options = MockOptions()
     options.build = True
     options.build_style = True
     options.check_style = True
     options.check_style_filter = None
     options.clean = True
     options.close_bug = True
     options.force_clean = False
     options.non_interactive = False
     options.parent_command = 'MOCK parent command'
     options.quiet = False
     options.test = True
     options.update = True
     return options
开发者ID:BrianGFlores,项目名称:android_external_svmp_fbstream,代码行数:17,代码来源:download_unittest.py

示例5: _default_options

# 需要导入模块: from webkitpy.tool.mocktool import MockOptions [as 别名]
# 或者: from webkitpy.tool.mocktool.MockOptions import non_interactive [as 别名]
 def _default_options(self):
     options = MockOptions()
     options.build = True
     options.build_style = "release"
     options.check_style = True
     options.check_style_filter = None
     options.clean = True
     options.close_bug = True
     options.force_clean = False
     options.non_interactive = False
     options.parent_command = "MOCK parent command"
     options.quiet = False
     options.test = True
     options.update = True
     options.architecture = "MOCK ARCH"
     options.iterate_on_new_tests = 0
     return options
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:19,代码来源:download_unittest.py

示例6: test_runtests_leopard_commit_queue_hack

# 需要导入模块: from webkitpy.tool.mocktool import MockOptions [as 别名]
# 或者: from webkitpy.tool.mocktool.MockOptions import non_interactive [as 别名]
    def test_runtests_leopard_commit_queue_hack(self):
        mock_options = MockOptions()
        mock_options.non_interactive = True
        step = RunTests(MockTool(log_executive=True), mock_options)
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        mock_port = WebKitPort()
        mock_port.name = lambda: "Mac"
        mock_port.is_leopard = lambda: True
        step.port = lambda: mock_port
        expected_stderr = """Running Python unit tests
MOCK run_and_throw_if_fail: ['WebKitTools/Scripts/test-webkitpy']
Running Perl unit tests
MOCK run_and_throw_if_fail: ['WebKitTools/Scripts/test-webkitperl']
Running JavaScriptCore tests
MOCK run_and_throw_if_fail: ['WebKitTools/Scripts/run-javascriptcore-tests']
Running run-webkit-tests
MOCK run_and_throw_if_fail: ['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--wait-for-httpd', '--ignore-tests', 'compositing,media', '--quiet']
"""
        OutputCapture().assert_outputs(self, step.run, [{}], expected_stderr=expected_stderr)
开发者ID:,项目名称:,代码行数:21,代码来源:

示例7: test_post

# 需要导入模块: from webkitpy.tool.mocktool import MockOptions [as 别名]
# 或者: from webkitpy.tool.mocktool.MockOptions import non_interactive [as 别名]
    def test_post(self):
        options = MockOptions()
        options.cc = None
        options.check_style = True
        options.check_style_filter = None
        options.comment = None
        options.description = "MOCK description"
        options.non_interactive = False
        options.request_commit = False
        options.review = True
        options.suggest_reviewers = False
        expected_logs = """MOCK: user.open_url: file://...
Was that diff correct?
Obsoleting 2 old patches on bug 50000
MOCK reassign_bug: bug_id=50000, assignee=None
MOCK add_patch_to_bug: bug_id=50000, description=MOCK description, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False
MOCK: user.open_url: http://example.com/50000
"""
        self.assert_execute_outputs(Post(), [50000], options=options, expected_logs=expected_logs)
开发者ID:AndriyKalashnykov,项目名称:webkit,代码行数:21,代码来源:upload_unittest.py


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