Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail_under param not working in .coveragerc #314

Closed
nedbat opened this issue Jul 8, 2014 · 6 comments
Closed

fail_under param not working in .coveragerc #314

nedbat opened this issue Jul 8, 2014 · 6 comments
Labels
bug Something isn't working report

Comments

@nedbat
Copy link
Owner

nedbat commented Jul 8, 2014

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


@nedbat
Copy link
Owner Author

nedbat commented Jul 9, 2014

fail_under isn't an option that can currently be set in the .coveragerc file. It only works if set on the command line. I suppose that could change....

@nedbat
Copy link
Owner Author

nedbat commented Oct 21, 2014

Issue #332 was marked as a duplicate of this issue.

@nedbat
Copy link
Owner Author

nedbat commented Nov 27, 2014

Implemented in fabb2d4d3720 (bb)

@nedbat
Copy link
Owner Author

nedbat commented Feb 6, 2015

Original comment by Kristian Glass (Bitbucket: DoISmellBurning, GitHub: DoISmellBurning)


Could this fix see its way to a point-release please, because it's just been the cause of much confusion!

@nedbat
Copy link
Owner Author

nedbat commented Feb 6, 2015

@doismellburning I'm sorry, but this change, as small as it seems, depended on some deeper changes that are not in 3.7.1. Also, it's difficult for me to keep two development streams going on a side project.

@nedbat
Copy link
Owner Author

nedbat commented Feb 6, 2015

Original comment by Kristian Glass (Bitbucket: DoISmellBurning, GitHub: DoISmellBurning)


No worries - thanks for getting back to me + all the work! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working report
Projects
None yet
Development

No branches or pull requests

1 participant