diff options
-rw-r--r-- | doc/subprocess.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/subprocess.rst b/doc/subprocess.rst index 383c797f..bcf50445 100644 --- a/doc/subprocess.rst +++ b/doc/subprocess.rst @@ -26,6 +26,14 @@ multiple coverage.py runs will each write their data to a distinct file. Configuring Python for subprocess coverage ------------------------------------------ +To measure coverage in subprocesses, you have to do two things: set a value for +the ``COVERAGE_PROCESS_START`` environment variable, and then invoke +:func:`coverage.process_startup`. + +How you set ``COVERAGE_PROCESS_START`` depends on the details of how you create +subprocesses. As long as the environment variable is visible in your subprocess, +it will work. + You can configure your Python installation to invoke the ``process_startup`` function in two ways: |