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
When running the tests the coverage reporting is now broken. In the report below we can see that the overall coverage is 57% where it should be a lot higher, a simple example of where there are problems with the report is in nornir/__init__.py which is reported as having all lines missing. Together with #525 we never spot this issue as the badge displayed within the README file hasn't changed in years.
I think the problem comes from later versions of pytest (and or pytest-cov) and the fact that we have a directory under ./tests called plugins and that pytest tries to load this directory to look for pytest plugins prior to pytest-cov being loaded so coverage never sees the missing lines as they have already been imported.
This needs to be verified but if it's the case a solution would be to either rename the plugins folder under the tests, or to remove pytest-cov and use coverage directly and call pytest from coverage instead of the other way around.
When running the tests the coverage reporting is now broken. In the report below we can see that the overall coverage is 57% where it should be a lot higher, a simple example of where there are problems with the report is in
nornir/__init__.py
which is reported as having all lines missing. Together with #525 we never spot this issue as the badge displayed within the README file hasn't changed in years.I think the problem comes from later versions of pytest (and or pytest-cov) and the fact that we have a directory under ./tests called
plugins
and that pytest tries to load this directory to look for pytest plugins prior to pytest-cov being loaded socoverage
never sees the missing lines as they have already been imported.This needs to be verified but if it's the case a solution would be to either rename the plugins folder under the tests, or to remove pytest-cov and use coverage directly and call pytest from coverage instead of the other way around.
The text was updated successfully, but these errors were encountered: