[TIP] How to get coverage.py and unittest2 working together?

Tim Hatch tim at timhatch.com
Thu Jul 22 13:02:26 PDT 2010


> In theory something like
> 
> coverage run unit2 discover
> 
> should work but it doesn't as coverage expects a .py file to execute.

I haven't tried, but on *nix maybe this works (but will report on lots
of unittest2 modules most likely):

coverage run `which unit2` discover

Tim



More information about the testing-in-python mailing list