本文整理汇总了Python中webkitpy.tool.mocktool.MockOptions.comment方法的典型用法代码示例。如果您正苦于以下问题:Python MockOptions.comment方法的具体用法?Python MockOptions.comment怎么用?Python MockOptions.comment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webkitpy.tool.mocktool.MockOptions
的用法示例。
在下文中一共展示了MockOptions.comment方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_attach_to_bug_no_description_or_comment
# 需要导入模块: from webkitpy.tool.mocktool import MockOptions [as 别名]
# 或者: from webkitpy.tool.mocktool.MockOptions import comment [as 别名]
def test_attach_to_bug_no_description_or_comment(self):
options = MockOptions()
options.comment = None
options.description = None
expected_stderr = """MOCK add_attachment_to_bug: bug_id=50000, description=file.txt filename=None mimetype=None
"""
self.assert_execute_outputs(AttachToBug(), [50000, "path/to/file.txt"], options=options, expected_stderr=expected_stderr)
示例2: test_attach_to_bug
# 需要导入模块: from webkitpy.tool.mocktool import MockOptions [as 别名]
# 或者: from webkitpy.tool.mocktool.MockOptions import comment [as 别名]
def test_attach_to_bug(self):
options = MockOptions()
options.comment = "extra comment"
options.description = "file description"
expected_stderr = """MOCK add_attachment_to_bug: bug_id=50000, description=file description filename=None mimetype=None
-- Begin comment --
extra comment
-- End comment --
"""
self.assert_execute_outputs(AttachToBug(), [50000, "path/to/file.txt", "file description"], options=options, expected_stderr=expected_stderr)
示例3: test_upload
# 需要导入模块: from webkitpy.tool.mocktool import MockOptions [as 别名]
# 或者: from webkitpy.tool.mocktool.MockOptions import comment [as 别名]
def test_upload(self):
options = MockOptions()
options.cc = None
options.check_style = True
options.comment = None
options.description = "MOCK description"
options.request_commit = False
options.review = True
options.suggest_reviewers = False
expected_stderr = """MOCK: user.open_url: file://...
Was that diff correct?
Obsoleting 2 old patches on bug 42
MOCK add_patch_to_bug: bug_id=42, description=MOCK description, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False
MOCK: user.open_url: http://example.com/42
"""
self.assert_execute_outputs(Upload(), [42], options=options, expected_stderr=expected_stderr)
示例4: test_upload
# 需要导入模块: from webkitpy.tool.mocktool import MockOptions [as 别名]
# 或者: from webkitpy.tool.mocktool.MockOptions import comment [as 别名]
def test_upload(self):
options = MockOptions()
options.description = "MOCK description"
options.request_commit = False
options.review = True
options.comment = None
options.cc = None
expected_stderr = """Running check-webkit-style
MOCK: user.open_url: file://...
Obsoleting 2 old patches on bug 42
MOCK add_patch_to_bug: bug_id=42, description=MOCK description, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False
-- Begin comment --
None
-- End comment --
MOCK: user.open_url: http://example.com/42
"""
self.assert_execute_outputs(Upload(), [42], options=options, expected_stderr=expected_stderr)
示例5: test_post
# 需要导入模块: from webkitpy.tool.mocktool import MockOptions [as 别名]
# 或者: from webkitpy.tool.mocktool.MockOptions import comment [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.request_commit = False
options.review = True
options.suggest_reviewers = False
expected_stderr = """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_stderr=expected_stderr)