Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pytest-cov for reporting test coverage (huggingface#641)
As discussed, this adds line coverage to the tests. This will allow us to identify parts of the code that are missing coverage and make it easier to ensure newly added code is well covered. At the moment, CI is not set up to report if new, uncovered code is being added. We could add codecov to the CI to get this functionality, but having 100% coverage for new code is not always desired, so it's debatable if it is needed. Right now, there are multiple test commands (normal, single, multi GPU). For each individual command, the coverage report would only include the lines covered by that command, so the total coverage would be underreported. It is possible to combine multiple coverage reports into a single report: https://coverage.readthedocs.io/en/stable/cmd.html#cmd-combine Combining the reports will be added in a future PR.
- Loading branch information