File tree 2 files changed +12
-3
lines changed 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,8 @@ option, or coverage.py will produce very wrong results.
132
132
.. _gevent : http://www.gevent.org/
133
133
.. _eventlet : http://eventlet.net/
134
134
135
+ See :ref: subprocess: for details of multi-process measurement.
136
+
135
137
Before version 4.2, this option only accepted a single string.
136
138
137
139
.. versionadded :: 4.0
Original file line number Diff line number Diff line change @@ -25,17 +25,24 @@ the name of the :ref:`configuration file <config>` to use.
25
25
26
26
.. note ::
27
27
28
- If you have subprocesses because you are using :mod: `multiprocessing
28
+ If you have subprocesses created with :mod: `multiprocessing
29
29
<python:multiprocessing> `, the ``--concurrency=multiprocessing ``
30
30
command-line option should take care of everything for you. See
31
31
:ref: `cmd_run ` for details.
32
32
33
+ .. note ::
34
+
35
+ Stopping a multiprocessing process with :meth: `terminate
36
+ <python:multiprocessing.Process.terminate> ` or :meth: `kill
37
+ <python:multiprocessng.Process.kill> ` will prevent recording data from the
38
+ stopped process. Those methods don't run clean-up code in the process.
39
+
33
40
When using this technique, be sure to set the parallel option to true so that
34
41
multiple coverage.py runs will each write their data to a distinct file.
35
42
36
43
37
- Configuring Python for sub-process coverage
38
- -------------------------------------------
44
+ Configuring Python for sub-process measurement
45
+ ----------------------------------------------
39
46
40
47
Measuring coverage in sub-processes is a little tricky. When you spawn a
41
48
sub-process, you are invoking Python to run your program. Usually, to get
You can’t perform that action at this time.
0 commit comments