[New-bugs-announce] [issue11978] Report correct coverage.py data for tests that invoke subprocesses
report at bugs.python.org
Mon May 2 15:46:10 CEST 2011
New submission from Nick Coghlan <ncoghlan at gmail.com>:
http://nedbatchelder.com/code/coverage/subprocess.html describes how to instruct a test suite that spawns subprocesses to correctly report coverage data for code covered only in those subprocesses.
regrtest currently doesn't do this, so modules that use subprocesses to run their tests may report inaccurate coverage numbers when using this tool (as recommended in the devguide). (Those numbers are irredeemably inaccurate when it comes to regrtest's own coverage assessment)
It may be better to build explicit invocation of coverage.py when regrtest is run under coverage.py into test.script_helper rather than trying to use the implicit mechanism though (as neither sitecustomize nor a .pth file are particularly good ideas when running Python's own test suite).
nosy: brett.cannon, ncoghlan, nedbat
title: Report correct coverage.py data for tests that invoke subprocesses
type: feature request
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce