[issue11978] Report correct coverage.py data for tests that invoke subprocesses

Nick Coghlan report at bugs.python.org
Thu Apr 6 05:39:25 EDT 2017


Nick Coghlan added the comment:

To be more specific regarding `sitecustomize.py`:

    $ echo "print('Hello from sitecustomize.py')" > Lib/sitecustomize.py
    $ ./python -c "print('Hello from command line')"
    Hello from sitecustomize.py
    Hello from command line

Since we only need these instructions to work for a local checkout, we can rely on the `sitecustomize.py` hook.

It means we'll still miss coverage results from subprocess tests run in isolated mode or with site.py processing disabled, but those are both relatively rare and involve *not* running code that is normally run, so shouldn't impact the aggregate coverage results.

----------

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


More information about the Python-bugs-list mailing list