本文整理匯總了Python中coveralls.Coveralls.git_info方法的典型用法代碼示例。如果您正苦於以下問題:Python Coveralls.git_info方法的具體用法?Python Coveralls.git_info怎麽用?Python Coveralls.git_info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類coveralls.Coveralls
的用法示例。
在下文中一共展示了Coveralls.git_info方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_git
# 需要導入模塊: from coveralls import Coveralls [as 別名]
# 或者: from coveralls.Coveralls import git_info [as 別名]
def test_git(self):
cover = Coveralls(repo_token='xxx')
git_info = cover.git_info()
commit_id = git_info['git']['head'].pop('id')
assert re.match(r'^[a-f0-9]{40}$', commit_id)
assert git_info == {'git': {
'head': {
'committer_email': '[email protected]',
'author_email': '[email protected]',
'author_name': 'Daniël',
'message': 'first commit',
'committer_name': 'Daniël',
},
'remotes': [{
'url': 'https://github.com/username/Hello-World.git',
'name': 'origin'
}],
'branch': 'master'
}}
示例2: test_git
# 需要導入模塊: from coveralls import Coveralls [as 別名]
# 或者: from coveralls.Coveralls import git_info [as 別名]
def test_git(self):
cover = Coveralls(repo_token='xxx')
git_info = cover.git_info()
commit_id = git_info['git']['head'].pop('id')
self.assertTrue(re.match(r'^[a-f0-9]{40}$', commit_id))
# expect(commit_id).should.match(r'^[a-f0-9]{40}$', re.I | re.U) sure 1.1.7 is broken for py2.6
expect(git_info).should.be.equal({'git': {
'head': {
'committer_email': '[email protected]',
'author_email': '[email protected]',
'author_name': 'Guido',
'message': 'first commit',
'committer_name': 'Guido',
},
'remotes': [{
'url': u'https://github.com/username/Hello-World.git',
'name': u'origin'
}],
'branch': u'master'}})