本文整理汇总了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])
示例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
示例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
示例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
示例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
示例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)
示例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)