Helo all, >From the FAQ of the coverage module (1):
""" Q: Why do the bodies of functions (or classes) show as executed, but the def lines do not? This happens because coverage is started after the functions are defined. The definition lines are executed without coverage measurement, then coverage is started, then the function is called. This means the body is measured, but the definition of the function itself is not. To fix this, start coverage earlier. If you use the command line to run your program with coverage, then your entire program will be monitored. If you are using the API, you need to call coverage.start() before importing the modules that define your functions. """ I'm not exactly sure (after some playing with pytest_cov plugin) how to do this... I'll take another look tonight if I can, but appreciate someone more experienced with pytest internals to take a look :) cheers James 1. http://nedbatchelder.com/code/coverage/faq.html#faq -- -- James Mills -- -- "Problems are solved by method" _______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev