[TIP] getting (subprocess) coverage.py to work for the first time

Dustin Lee qhfgva at gmail.com
Fri Jan 13 12:41:07 PST 2012


I was able to run a simple "coverage myscript.py" type example and also a
"cov = coverage.coverage()" type.  This is just to confirm that I was able
to see output and that basic functionality is in place.

Now my intended use case is to use the subprocess functionality.

I have the following in sitecustomize.py

# from the documentation
import coverage
coverage.process_startup()

and I ran the following in the shell window from which I'm kicking off my
test:
export COVERAGE_PROCESS_START=/home/mydir/.coveragerc

My expectation now is that *any* python process that kicks off from here on
out should be logging coverage data.  (Is that right?)

Now is where I get lost.  I threw some lines in the coverage code itself to
see if the configuration file was getting read and if process_startup was
being called (and they were).  So now I'm trying to figure out where my
output is going to or if I need to do something special to make the output
start dumping.  Or if I'm even thinking about things correctly.

Also what troubleshooting options do I have for trying to figure this out
for myself?

thanks in advance,

dustin

-- 
Dustin Lee
qhfgva=rot13(dustin)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20120113/33adc6be/attachment.html>


More information about the testing-in-python mailing list