-
Notifications
You must be signed in to change notification settings - Fork 119
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
Coverage for tests #541
Comments
I can see how this may be useful. Unfortunately due to the way that covr works internally this isn't really easily done so I don't feel the added value would justify the time required to implement and maintain this. |
I see. I looked at the code and it seems Is this something that would require support from the |
The problem is more related to how covr tracks coverage. In order to track coverage it needs to instrument the code and add tracing calls, this is done by instrumenting functions in the package namespace when the package is loaded. Code within test files is not included in the package namespace. However you could try to cobble something together yourself by using |
I am happy to give this a try but the first obstacle is that |
It would be useful to report coverage for files under
tests
:tests
directory may contain code that is not a test itself but it is supposed to be used by tests. If that code is not used, it can probably be removed.tests
are actually run (and if a test stopped running for some reason) is useful.pytest --covr
does report coverage for tests, which allows setting different codecov components/flags with different status criteria forR
andtests
. (For example, we may require that coverage for tests cannot decrease of the CI fails)The option
covr.record_tests
does a lot more than just recording coverage for tests.The text was updated successfully, but these errors were encountered: