fail_under param not working in .coveragerc · Issue #314 · nedbat/coveragepy (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@nedbat

Description

@nedbat

Originally reported by Micah Hausler (Bitbucket: micahhausler, GitHub: micahhausler)


When I run coverage run setup.py test and then coverage report, the output properly reports the coverage at 88% and shows the missing lines, but it exits with a status of 0, where it should fail. If I add --fail-under=100` flag to the command line, it properly fails.

Here is my .coveragerc file:

#!ini

[run]
branch = True
omit =
    querybuilder/migrations/*
    querybuilder/tests/*
    querybuilder/version.py
source = querybuilder
[report]
exclude_lines =
    # Have to re-enable the standard pragma
    pragma: no cover

    # Don't complain if tests don't hit defensive assertion code:
    raise NotImplementedError
fail_under=100
show_missing = 1

Coverage version is 3.7.1

TravisCI build output: https://travis-ci.org/ambitioninc/django-query-builder/jobs/29320446