You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HI! Describe the bug
I configure the coverage.py through .coveragerc file (see below). I can see that coverage does the things I configure in coveragerc accordingly despite fail_under parameter. When defining the fail_under = 99.0 (both int and float does not work) parameter the coverage report command does not exit with a "fail" or something. Furthermore, using the option in the command coverage report --fail-under=99 does not raise a failure or something.
To Reproduce
Unfortunately, I cannot share the code through a repository or something. The thing is that the commands which I'm running do work the way they should do. However, I want the 'coverage report' respectively the coverage report --fail-under=99 command to fail or exit with failures linked to the threshold via fail_under = 99.0 (that I can use for Jenkins Pipeline later).
However, it is a basic Django 3.0.4 project with no extra magic using Django REST Framework 3.11. I did my first steps with django-nose in this project but then realized that django-nose is not properly supported anymore. So I decided to switch to "pure coverage" (this is why in pip freeze the django-nose is still listed)
Expected behavior
When running coverage report after printing the list the command should according to the threshold defined through fail_under parameter in .coveragerc as well as in included in the command like coverage report --fail-under=99
The text was updated successfully, but these errors were encountered:
It's not clear to me how you are running the coverage commands. --fail-under can be mysterious because it's really quiet: it just affects the status code of the command. (See #977 for a change to show a message when it fails.)
Depending on how you are running the commands, you might not notice that it is returning a failure code.
HI!
Describe the bug
I configure the coverage.py through .coveragerc file (see below). I can see that coverage does the things I configure in coveragerc accordingly despite fail_under parameter. When defining the fail_under = 99.0 (both int and float does not work) parameter the coverage report command does not exit with a "fail" or something. Furthermore, using the option in the command
coverage report --fail-under=99
does not raise a failure or something.To Reproduce
Unfortunately, I cannot share the code through a repository or something. The thing is that the commands which I'm running do work the way they should do. However, I want the 'coverage report' respectively the
coverage report --fail-under=99
command to fail or exit with failures linked to the threshold via fail_under = 99.0 (that I can use for Jenkins Pipeline later).However, it is a basic Django 3.0.4 project with no extra magic using Django REST Framework 3.11. I did my first steps with django-nose in this project but then realized that django-nose is not properly supported anymore. So I decided to switch to "pure coverage" (this is why in pip freeze the django-nose is still listed)
Structure:
./app
/app/customer_db
/app/core
/app/api
/app/user
./manage.py
./coveragerc
Commands:
coverage run manage.py test
coverage report
OUTPUT:
python --version:
Python 3.6.7
pip freeze:
In .coveragerc:
coverage debug sys:
Expected behavior
When running coverage report after printing the list the command should according to the threshold defined through fail_under parameter in .coveragerc as well as in included in the command like coverage report --fail-under=99
The text was updated successfully, but these errors were encountered: