Skip to content
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 % is misleading #23

Closed
3 tasks
robertmuil opened this issue May 30, 2016 · 0 comments
Closed
3 tasks

coverage % is misleading #23

robertmuil opened this issue May 30, 2016 · 0 comments

Comments

@robertmuil
Copy link
Contributor

We're getting very good coverage percentages out of runtests htmlcov but the numbers are quite misleading: at least some of the unittests are not actually verifying the returned data properly: e.g. test_experiment.test__feature_check__computation() doesn't verify the feature check of the feature feature...

We should:

  • push all unittests as low as possible in the function call structure (e.g. check the feature check directly, not through the class-level interface) so that it is clearer what needs to be checked
  • when writing unittests, indicate clearly (if only in the function docstrings) whether some checks have not been implemented yet, or better:
  • do not call functions in a unittest unless you are sure you have comprehensively checked the return

In any case when we are performing a complex operation on a data-set (like a feature-check of a dataframe) we must be careful to really check the return: otherwise all the code that gets hit by the called operation will be marked as 'covered' but will not actually have been tested!

this is a very general problem... I'm sure others have had the same issue... I wonder how they've dealt with it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants