samedi 22 juillet 2017

How to make python's coverage library include doctests

From googling and experimentation, it seems python's coverage library doesn't include doctests in its calculations. Is there any way to make it do so?

I have searched the docs (http://ift.tt/2rNkBNP) and found no mention of doctests, but it seems so odd that it wouldn't have some way of including them that I feel like I must be missing something.

If I'm right, and coverage won't include them, how can I get a measurement of my test coverage without changing all my doctests into unit tests with unittest (which I don't want to do)?

Aucun commentaire:

Enregistrer un commentaire