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


Python Coveralls.create_report方法代码示例

本文整理汇总了Python中coveralls.Coveralls.create_report方法的典型用法代码示例。如果您正苦于以下问题:Python Coveralls.create_report方法的具体用法?Python Coveralls.create_report怎么用?Python Coveralls.create_report使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在coveralls.Coveralls的用法示例。


在下文中一共展示了Coveralls.create_report方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_merge_empty_data

# 需要导入模块: from coveralls import Coveralls [as 别名]
# 或者: from coveralls.Coveralls import create_report [as 别名]
 def test_merge_empty_data(self, mock_requests):
     api = Coveralls(repo_token='xxx')
     coverage_file = tempfile.NamedTemporaryFile()
     coverage_file.write(b'{}')
     coverage_file.seek(0)
     api.merge(coverage_file.name)
     result = api.create_report()
     assert json.loads(result)['source_files'] == []
开发者ID:Jwpe,项目名称:coveralls-python,代码行数:10,代码来源:test_api.py

示例2: test_merge

# 需要导入模块: from coveralls import Coveralls [as 别名]
# 或者: from coveralls.Coveralls import create_report [as 别名]
 def test_merge(self, mock_requests):
     api = Coveralls(repo_token='xxx')
     coverage_file = tempfile.NamedTemporaryFile()
     coverage_file.write(b'{"source_files": [{"name": "foobar", "coverage": []}]}')
     coverage_file.seek(0)
     api.merge(coverage_file.name)
     result = api.create_report()
     assert json.loads(result)['source_files'] == [{'name': 'foobar', 'coverage': []}]
开发者ID:Jwpe,项目名称:coveralls-python,代码行数:10,代码来源:test_api.py

示例3: test_merge_invalid_data

# 需要导入模块: from coveralls import Coveralls [as 别名]
# 或者: from coveralls.Coveralls import create_report [as 别名]
 def test_merge_invalid_data(self, mock_logger, mock_requests):
     api = Coveralls(repo_token='xxx')
     coverage_file = tempfile.NamedTemporaryFile()
     coverage_file.write(b'{"random": "stuff"}')
     coverage_file.seek(0)
     api.merge(coverage_file.name)
     result = api.create_report()
     assert json.loads(result)['source_files'] == []
     mock_logger.assert_called_once_with('No data to be merged; does the '
                                         'json file contain "source_files" data?')
开发者ID:Jwpe,项目名称:coveralls-python,代码行数:12,代码来源:test_api.py


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