mardi 23 juin 2015

nose reports cumulative coverage

Image a situation where you have a BASE_CLASS. Several class inherits from that class: CHILD_A, CHILD_B, CHILD_C.

Now let us write unit tests, but ONLY for CHILD_A, CHILD_B, CHILD_C. I would suspect, that the coverage for BASE_CLASS is 0%. Unfortunately, nose takes cumulative coverage, which is not what I want. I tried using the ---cover-erase flag while executing the tests, but that doesn't help.

My question is: How can I force nose not to use cumulative coverage? I need this to know how good is the unit test for BASE_CLASS.

Aucun commentaire:

Enregistrer un commentaire