本文整理匯總了Python中webkitpy.common.checkout.api.Checkout.commit_info_for_revision方法的典型用法代碼示例。如果您正苦於以下問題:Python Checkout.commit_info_for_revision方法的具體用法?Python Checkout.commit_info_for_revision怎麽用?Python Checkout.commit_info_for_revision使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類webkitpy.common.checkout.api.Checkout
的用法示例。
在下文中一共展示了Checkout.commit_info_for_revision方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_commit_info_for_revision
# 需要導入模塊: from webkitpy.common.checkout.api import Checkout [as 別名]
# 或者: from webkitpy.common.checkout.api.Checkout import commit_info_for_revision [as 別名]
def test_commit_info_for_revision(self):
scm = Mock()
scm.committer_email_for_revision = lambda revision: "[email protected]"
checkout = Checkout(scm)
checkout.changelog_entries_for_revision = lambda revision: [ChangeLogEntry(_changelog1entry1)]
commitinfo = checkout.commit_info_for_revision(4)
self.assertEqual(commitinfo.bug_id(), 36629)
self.assertEqual(commitinfo.author_name(), u"Tor Arne Vestb\u00f8")
self.assertEqual(commitinfo.author_email(), "[email protected]")
self.assertEqual(commitinfo.reviewer_text(), None)
self.assertEqual(commitinfo.reviewer(), None)
self.assertEqual(commitinfo.committer_email(), "[email protected]")
self.assertEqual(commitinfo.committer(), None)
checkout.changelog_entries_for_revision = lambda revision: []
self.assertEqual(checkout.commit_info_for_revision(1), None)