[issue14803] Add -C option to run code at Python startup
Ned Batchelder
report at bugs.python.org
Mon May 14 21:02:53 CEST 2012
Ned Batchelder <ned at nedbatchelder.com> added the comment:
The difficulty that coverage faces is not measuring python programs started from the command line like this, you can use "coverage run myprog.py" or "python -m coverage run myprog.py".
The difficulty is when there are subprocesses running python programs. Read http://nedbatchelder.com/code/coverage/subprocess.html for the two current hacks used to invoke coverage on subprocesses. If -C is implemented, it should have a PYTHONRUNFIRST environment variable (or the like) to make these hacks unnecessary.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14803>
_______________________________________
More information about the Python-bugs-list
mailing list