[TIP] coverage and external process
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:
> I don't know how the --with-cov plugin affects things, I run coverage
>> testing-in-python mailing list
>> testing-in-python at lists.idyll.org
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
More information about the testing-in-python