本文整理汇总了Python中webkitpy.thirdparty.mock.Mock.comment方法的典型用法代码示例。如果您正苦于以下问题:Python Mock.comment方法的具体用法?Python Mock.comment怎么用?Python Mock.comment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webkitpy.thirdparty.mock.Mock
的用法示例。
在下文中一共展示了Mock.comment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_mark_bug_fixed
# 需要导入模块: from webkitpy.thirdparty.mock import Mock [as 别名]
# 或者: from webkitpy.thirdparty.mock.Mock import comment [as 别名]
def test_mark_bug_fixed(self):
tool = MockTool()
tool._scm.last_svn_commit_log = lambda: "r9876 |"
options = Mock()
options.bug_id = 42
options.comment = "MOCK comment"
expected_stderr = "Bug: <http://example.com/42> Bug with two r+'d and cq+'d patches, one of which has an invalid commit-queue setter.\nRevision: 9876\nMOCK: user.open_url: http://example.com/42\nAdding comment to Bug 42.\nMOCK bug comment: bug_id=42, cc=None\n--- Begin comment ---\nMOCK comment\n\nCommitted r9876: <http://trac.webkit.org/changeset/9876>\n--- End comment ---\n\n"
self.assert_execute_outputs(MarkBugFixed(), [], expected_stderr=expected_stderr, tool=tool, options=options)
示例2: test_upload
# 需要导入模块: from webkitpy.thirdparty.mock import Mock [as 别名]
# 或者: from webkitpy.thirdparty.mock.Mock import comment [as 别名]
def test_upload(self):
options = Mock()
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)