本文整理汇总了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'}})