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


Python Coveralls.wear方法代码示例

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


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

示例1: main

# 需要导入模块: from coveralls import Coveralls [as 别名]
# 或者: from coveralls.Coveralls import wear [as 别名]
def main(argv=None):
    options = docopt(__doc__, argv=argv)
    if options['debug']:
        options['--verbose'] = True
    level = logging.DEBUG if options['--verbose'] else logging.INFO
    log.addHandler(logging.StreamHandler())
    log.setLevel(level)

    try:
        coverallz = Coveralls(config_file=options['--rcfile'])
        if not options['debug']:
            log.info("Submitting coverage to coveralls.io...")
            result = coverallz.wear()
            log.info("Coverage submitted!")
            log.info(result['message'])
            log.info(result['url'])
            log.debug(result)
        else:
            log.info("Testing coveralls-python...")
            coverallz.wear(dry_run=True)
    except KeyboardInterrupt:  # pragma: no cover
        log.info('Aborted')
    except CoverallsException as e:
        log.error(e)
    except KeyError as e:  # pragma: no cover
        log.error(e)
    except Exception:  # pragma: no cover
        raise
开发者ID:Mondego,项目名称:pyreco,代码行数:30,代码来源:allPythonContent.py

示例2: main

# 需要导入模块: from coveralls import Coveralls [as 别名]
# 或者: from coveralls.Coveralls import wear [as 别名]
def main(argv=None):
    options = docopt(__doc__, argv=argv)
    if options["debug"]:
        options["--verbose"] = True
    level = logging.DEBUG if options["--verbose"] else logging.INFO
    log.addHandler(logging.StreamHandler())
    log.setLevel(level)

    try:
        coverallz = Coveralls()
        if not options["debug"]:
            log.info("Submitting coverage to coveralls.io...")
            result = coverallz.wear()
            log.info("Coverage submitted!")
            log.info(result["message"])
            log.info(result["url"])
            log.debug(result)
        else:
            log.info("Testing coveralls-python...")
            coverallz.wear(dry_run=True)
    except KeyboardInterrupt:  # pragma: no cover
        log.info("Aborted")
    except CoverallsException as e:
        log.error(e)
    except Exception:  # pragma: no cover
        raise
开发者ID:TeamSidewinder,项目名称:coveralls-python,代码行数:28,代码来源:cli.py

示例3: main

# 需要导入模块: from coveralls import Coveralls [as 别名]
# 或者: from coveralls.Coveralls import wear [as 别名]
def main(argv=None):
    options = docopt(__doc__, argv=argv)
    if options['debug']:
        options['--verbose'] = True
    level = logging.DEBUG if options['--verbose'] else logging.INFO
    log.addHandler(logging.StreamHandler())
    log.setLevel(level)

    try:
        token_required = not options['debug'] and not options['--output']
        coverallz = Coveralls(token_required, config_file=options['--rcfile'])
        if options['--merge']:
            coverallz.merge(options['--merge'])

        if options['debug']:
            log.info("Testing coveralls-python...")
            coverallz.wear(dry_run=True)
        elif options['--output']:
            log.info('Write coverage report to file...')
            coverallz.save_report(options['--output'])
        else:
            log.info("Submitting coverage to coveralls.io...")
            result = coverallz.wear()
            log.info("Coverage submitted!")
            log.info(result['message'])
            log.info(result['url'])
            log.debug(result)
    except KeyboardInterrupt:  # pragma: no cover
        log.info('Aborted')
    except CoverallsException as e:
        log.error(e)
        sys.exit(1)
    except KeyError as e:  # pragma: no cover
        log.error(e)
        sys.exit(2)
    except Exception:  # pragma: no cover
        raise
开发者ID:Fale,项目名称:coveralls-python,代码行数:39,代码来源:cli.py


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