[TIP] coverage and external process

meme dough memedough at gmail.com
Fri Aug 31 22:35:05 PDT 2012


nose-cov has multiprocessing support, it should work out of the box
for program using multiprocessing or subprocess.

It does not work completely with nose multiprocessing plugin because
that plugin don't join with child processes.

But easy to fix up after.  There will be .coverage files for each
subprocess.  Tell coverage to combine them after nose test run.  Then
tell coverage to make report.

On 16 August 2012 23:26, Ned Batchelder <ned at nedbatchelder.com> wrote:
> On 8/16/2012 5:47 AM, andrea crotti wrote:
>>
>> Suppose I use multiprocessing in my tests, and nose with the --with-cov
>> plugin for coverage support, is there a way to make coverage detect the
>> lines that have been run by the subprocess?
>>
>> I would guess is not really possible but just to make sure..
>
> There are a few ways to do it:
> http://nedbatchelder.com/code/coverage/subprocess.html
>
> I don't know how the --with-cov plugin affects things, I run coverage
> directly.
>
> --Ned.
>
>
>> _______________________________________________
>> testing-in-python mailing list
>> testing-in-python at lists.idyll.org
>> http://lists.idyll.org/listinfo/testing-in-python
>>
>
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python



More information about the testing-in-python mailing list