[TIP] getting (subprocess) coverage.py to work for the first time
qhfgva at gmail.com
Fri Jan 13 14:23:54 PST 2012
OK, I think I understand my confusion now. Since I had a
directory = coverage_html_report
line in my configuration file I assumed that this directory would just
start getting magically populated with data as the processes were running.
Now I see that nothing happens until run
coverage report | html etc
Sorry for the noise.
On Fri, Jan 13, 2012 at 1:41 PM, Dustin Lee <qhfgva at gmail.com> wrote:
> 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
> and I ran the following in the shell window from which I'm kicking off my
> 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 Lee
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python