当前位置: 首页>>代码示例>>Python>>正文


Python Coveralls.git_info方法代码示例

本文整理汇总了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'
        }}
开发者ID:Jwpe,项目名称:coveralls-python,代码行数:22,代码来源:test_api.py

示例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'}})
开发者ID:asmeurer,项目名称:coveralls-python,代码行数:22,代码来源:test_api.py


注:本文中的coveralls.Coveralls.git_info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。