[TIP] coverage.py against a server

Ned Batchelder ned at nedbatchelder.com
Tue Sep 17 19:05:55 PDT 2013

On 9/17/13 7:42 AM, Lucian Ciufudean wrote:
> Hi guys,
> I embarked on the road of obtaining a coverage report for functional 
> tests against a server process. The server is deployed as .pyc files, 
> and the source files can be made available in a separate subversion 
> working folder. I wouldn't want to edit any existing .py files.
> Can coverage work with .pyc files - I am getting errors when using 
> coverage run main.pyc from the command line, so maybe with the API?

Hmm, you're right: "coverage run foo.pyc" does not work. I've created a 
ticket for this: 

> I tired this also, my custom code is run but it can not find the 
> source files at the time of coverage.html_report() although I passed 
> the directory of source files to coverage.coverage.

You'll have to show details of how you tried to run coverage.  If the 
.py files are in the places reported by your program, then it should 
work.  You can also use the [paths] section of a .coveragerc to instruct 
coverage where the files are.


> Thanks a lot,
> Lucian
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20130917/c29333ba/attachment.htm>

More information about the testing-in-python mailing list