manage.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:flask-jwt-auth 作者: realpython 项目源码 文件源码
def cov():
    """Runs the unit tests with coverage."""
    tests = unittest.TestLoader().discover('project/tests')
    result = unittest.TextTestRunner(verbosity=2).run(tests)
    if result.wasSuccessful():
        COV.stop()
        COV.save()
        print('Coverage Summary:')
        COV.report()
        basedir = os.path.abspath(os.path.dirname(__file__))
        covdir = os.path.join(basedir, 'tmp/coverage')
        COV.html_report(directory=covdir)
        print('HTML version: file://%s/index.html' % covdir)
        COV.erase()
        return 0
    return 1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号