[New-bugs-announce] [issue11978] Report correct coverage.py data for tests that invoke subprocesses

Nick Coghlan 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).

----------
messages: 134967
nosy: brett.cannon, ncoghlan, nedbat
priority: normal
severity: normal
status: open
title: Report correct coverage.py data for tests that invoke subprocesses
type: feature request

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11978>
_______________________________________


More information about the New-bugs-announce mailing list