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
{{ message }}
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
Adding cov as a command that does test coverage, usually shows function/class headers as missing. This actually make sense because, in manage.py we import the app first then define our manager. After that we define cov. When cov is called all the prototypes of functions/classes are already loaded so coverage does not cover them and assumes they are missing.
The only way I managed to solve this is to not use the manager at all, and just add a new separate file cov.py that does the test coverage:
importcoveragecov=coverage.Coverage()
cov.start()
# .. call your tests ..cov.stop()
cov.save()
cov.html_report()
How to use the manager with coverage?
The text was updated successfully, but these errors were encountered:
Adding cov as a command that does test coverage, usually shows function/class headers as missing. This actually make sense because, in manage.py we import the app first then define our manager. After that we define cov. When cov is called all the prototypes of functions/classes are already loaded so coverage does not cover them and assumes they are missing.
The only way I managed to solve this is to not use the manager at all, and just add a new separate file
cov.py
that does the test coverage:How to use the manager with coverage?
The text was updated successfully, but these errors were encountered: