@@ -110,7 +110,7 @@ There are many options:
110
110
Run a Python program, measuring code execution.
111
111
112
112
Options:
113
- -a, --append Append coverage data to .coverage, otherwise it starts
113
+ -a, --append Append data to the data file. Otherwise it starts
114
114
clean each time.
115
115
--branch Measure branch coverage in addition to statement
116
116
coverage.
@@ -130,9 +130,8 @@ There are many options:
130
130
Accepts shell-style wildcards, which must be quoted.
131
131
-L, --pylib Measure coverage even inside the Python installed
132
132
library, which isn't done by default.
133
- -p, --parallel-mode Append the machine name, process id and random number
134
- to the data file name to simplify collecting data from
135
- many processes.
133
+ -p, --parallel-mode Append a unique suffix to the data file name to
134
+ collect separate data from multiple processes.
136
135
--save-signal=SIGNAL Specify a signal that will trigger coverage to write
137
136
its collected data. Supported values are: USR1, USR2.
138
137
Not available on Windows.
@@ -146,18 +145,21 @@ There are many options:
146
145
--rcfile=RCFILE Specify configuration file. By default '.coveragerc',
147
146
'setup.cfg', 'tox.ini', and 'pyproject.toml' are
148
147
tried. [env: COVERAGE_RCFILE]
149
- .. [[[end]]] (sum: 1Ks5r6cadh)
148
+ .. [[[end]]] (sum: YwMI03MDmQ)
149
+
150
+ Many of these options can also be set in the :ref: `config_run ` section of your
151
+ configuration file. Remember to put options for run after "run", but before
152
+ the program invocation::
153
+
154
+ $ coverage run --source=dir1,dir2 my_program.py arg1 arg2
155
+ $ coverage run --source=dir1,dir2 -m packagename.modulename arg1 arg2
150
156
151
157
If you want :ref: `branch coverage <branch >` measurement, use the ``--branch ``
152
158
flag. Otherwise only statement coverage is measured.
153
159
154
160
You can specify the code to measure with the ``--source ``, ``--include ``, and
155
161
``--omit `` switches. See :ref: `Specifying source files <source_execution >` for
156
- details of their interpretation. Remember to put options for run after "run",
157
- but before the program invocation::
158
-
159
- $ coverage run --source=dir1,dir2 my_program.py arg1 arg2
160
- $ coverage run --source=dir1,dir2 -m packagename.modulename arg1 arg2
162
+ details of their interpretation.
161
163
162
164
.. note ::
163
165
@@ -166,7 +168,6 @@ but before the program invocation::
166
168
<config_run_source>` setting in the configuration file to apply the setting
167
169
uniformly to all commands.
168
170
169
-
170
171
Coverage.py can measure multi-threaded programs by default. If you are using
171
172
more other concurrency support, with the `multiprocessing `_, `greenlet `_,
172
173
`eventlet `_, or `gevent `_ libraries, then coverage.py can get confused. Use the
@@ -205,22 +206,16 @@ If your coverage results seem to be overlooking code that you know has been
205
206
executed, try running coverage.py again with the ``--timid `` flag. This uses a
206
207
simpler but slower trace method, and might be needed in rare cases.
207
208
208
- In Python 3.12 and above, you can try an experimental core based on the new
209
- :mod: ` sys.monitoring <python:sys.monitoring> ` module by defining a
210
- `` COVERAGE_CORE=sysmon `` environment variable or by setting `` core = sysmon ``
211
- in the configuration file. This should be faster, though plugins and
212
- dynamic contexts are not yet supported with it.
209
+ If you are specifying `` --save-signal ``, please make sure that your program
210
+ doesn't intercept this signal. If it does, coverage won't receive the signal
211
+ and the data file will not be written.
212
+
213
+ .. versionadded :: 7.10 ``--save-signal``
213
214
214
215
Coverage.py sets an environment variable, ``COVERAGE_RUN `` to indicate that
215
216
your code is running under coverage measurement. The value is not relevant,
216
217
and may change in the future.
217
218
218
- These options can also be set in the :ref: `config_run ` section of your
219
- .coveragerc file.
220
-
221
- If you are specifying ``--save-signal ``, please make sure that your program
222
- doesn't intercept this signal. If it does, coverage won't receive the signal
223
- and the data file will not be written.
224
219
225
220
.. _cmd_warnings :
226
221
@@ -426,7 +421,7 @@ want to keep those files, use the ``--keep`` command-line option.
426
421
data files in the default data file's directory are combined.
427
422
428
423
Options:
429
- -a, --append Append coverage data to .coverage, otherwise it starts
424
+ -a, --append Append data to the data file. Otherwise it starts
430
425
clean each time.
431
426
--data-file=DATAFILE Base name of the data files to operate on. Defaults to
432
427
'.coverage'. [env: COVERAGE_FILE]
@@ -439,7 +434,7 @@ want to keep those files, use the ``--keep`` command-line option.
439
434
--rcfile=RCFILE Specify configuration file. By default '.coveragerc',
440
435
'setup.cfg', 'tox.ini', and 'pyproject.toml' are
441
436
tried. [env: COVERAGE_RCFILE]
442
- .. [[[end]]] (sum: C92D9kfudj )
437
+ .. [[[end]]] (sum: ARyg8KB1fE )
443
438
444
439
445
440
.. _cmd_combine_remapping :
0 commit comments