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

show total coverage when required test coverage reached #141

merged 3 commits into from Nov 16, 2016


None yet
2 participants

flniu commented Nov 15, 2016

This pr is the updated version of #140.

In our case, we specify --cov-report=html and --cov-fail-under=85, we want to see the total coverage in CI console at a glance, instead of printing a full term report or opening the html report, even when required test coverage(85%) is reached. So if total coverage is close to required, we may take actions in advance.


This comment has been minimized.


ionelmc commented Nov 15, 2016

Can you add one test (or extra assertion, surely there's a test for the passing fail-under)?

Feilong Niu added some commits Nov 16, 2016

Feilong Niu
fix flake8
E305 expected 2 blank lines after class or function definition

This comment has been minimized.

flniu commented Nov 16, 2016

I added 3 assertions for --cov-fail-under summary message.

And I also added a blank line in because of flake8 warning. I don't know why this didn't break the CI before.

@ionelmc ionelmc merged commit edd7a94 into pytest-dev:master Nov 16, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.


ionelmc commented Nov 16, 2016

Alright, thanks!

jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request May 17, 2017

Updated py-test-cov to 2.5.1.
2.5.1 (2017-05-11)

* Fixed xdist breakage (regression in ``2.5.0``).
  Fixes `#157 <>`_.
* Allow setting custom ``data_file`` name in ``.coveragerc``.
  Fixes `#145 <>`_.
  Contributed by Jannis Leidel & Ionel Cristian Mărieș in
  `#156 <>`_.

2.5.0 (2017-05-09)

* Always show a summary when ``--cov-fail-under`` is used. Contributed by Francis Niu in `PR#141
* Added ``--cov-branch`` option. Fixes `#85 <>`_.
* Improve exception handling in subprocess setup. Fixes `#144 <>`_.
* Fixed handling when ``--cov`` is used multiple times. Fixes `#151 <>`_.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment