def coverage ( ) : run ( "coverage run --source {PROJECT_NAME} -m py.test" . format ( PROJECT_NAME = PROJECT_NAME ) ) run ( "coverage report -m" ) run ( "coverage html" ) webbrowser . open ( 'file://' + os . path . realpath ( "htmlcov/index.html" ) , new = 2 )
python coverage report multiple files
check code coverage quickly with the default Python
def coverage():
    """check code coverage quickly with the default Python"""
    run("coverage run --source {PROJECT_NAME} -m py.test".format(PROJECT_NAME=PROJECT_NAME))
    run("coverage report -m")
    run("coverage html")

    webbrowser.open('file://' + os.path.realpath("htmlcov/index.html"), new=2)