Skip to content

Commit 2fd4961

Browse files
committed
docs: update the man page, for once
1 parent a13607f commit 2fd4961

File tree

1 file changed

+46
-19
lines changed

1 file changed

+46
-19
lines changed

doc/python-coverage.1.txt

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ Measure Python code coverage
88

99
:Author: Ned Batchelder <[email protected]>
1010
:Author: |author|
11-
:Date: 2022-12-03
11+
:Date: 2025-07-24
1212
:Copyright: Apache 2.0 license, attribution and disclaimer required.
1313
:Manual section: 1
1414
:Manual group: Coverage.py
1515

1616
.. |command| replace:: **python-coverage**
1717

1818
..
19+
This file is .rst format to produce a man page source file.
20+
1921
To test this file:
2022
$ rst2man < doc/python-coverage.1.txt | groff -man -Tascii
2123

@@ -78,8 +80,8 @@ GLOBAL OPTIONS
7880
Describe how to use coverage.py, in general or a command.
7981

8082
**--rcfile** `RCFILE`
81-
Specify configuration file `RCFILE`. By default '.coveragerc',
82-
'setup.cfg', 'tox.ini', and 'pyproject.toml' are tried.
83+
Specify configuration file `RCFILE`. By default ``.coveragerc``,
84+
``setup.cfg``, ``tox.ini``, and ``pyproject.toml`` are tried.
8385

8486
**--debug** `DEBUGOPT`,...
8587
Debug options `DEBUGOPT`, separated by commas.
@@ -89,7 +91,10 @@ GLOBAL OPTIONS
8991
COMMAND REFERENCE
9092
=================
9193

92-
**annotate** [ `option` ... ]
94+
**annotate** [ `option` ... ] [ `MODULE` ... ]
95+
96+
Make annotated copies of the given files, marking statements that are
97+
executed and statements that are missed.
9398

9499
Options:
95100

@@ -98,7 +103,7 @@ COMMAND REFERENCE
98103

99104
\--data-file `INFILE`
100105
Read coverage data for report generation from this
101-
file. Defaults to '.coverage'.
106+
file. Defaults to ``.coverage``.
102107

103108
\-i, --ignore-errors
104109
Ignore errors while reading source files.
@@ -111,6 +116,7 @@ COMMAND REFERENCE
111116
Omit files when their file name matches one of these PATTERNs.
112117
Usually needs quoting on the command line.
113118

119+
114120
**combine** [ `option` ... ] [ `PATH` ... ]
115121

116122
Combine data from multiple coverage files collected with ``run -p``.
@@ -128,15 +134,16 @@ COMMAND REFERENCE
128134
time.
129135

130136
\--data-file `DATAFILE`
131-
Base name of the data files to operate on. Defaults to '.coverage'.
137+
Base name of the data files to operate on. Defaults to ``.coverage``.
132138

133139
\--keep
134140
Keep original coverage data files.
135141

136142
\-q, --quiet
137143
Don't print messages about what is happening.
138144

139-
**debug** `TOPIC` ...
145+
146+
**debug** `TOPIC`
140147

141148
Display information about the internals of coverage.py, for diagnosing
142149
problems.
@@ -149,19 +156,22 @@ COMMAND REFERENCE
149156
``premain`` to show what is calling coverage;
150157
``pybehave`` to show internal flags describing Python behavior.
151158

159+
152160
**erase**
153161

154162
Erase previously collected coverage data.
155163

156164
Options:
157165

158166
\--data-file `DATAFILE`
159-
Base name of the data files to operate on. Defaults to '.coverage'.
167+
Base name of the data files to operate on. Defaults to ``.coverage``.
168+
160169

161170
**help** [ `command` ]
162171

163172
Describe how to use coverage.py.
164173

174+
165175
**html** [ `option` ... ] [ `MODULE` ... ]
166176

167177
Create an HTML report of the coverage of each `MODULE` file. Each file
@@ -178,7 +188,7 @@ COMMAND REFERENCE
178188

179189
\--data-file `INFILE`
180190
Read coverage data for report generation from this file.
181-
Defaults to '.coverage'.
191+
Defaults to ``.coverage``.
182192

183193
\--fail-under `MIN`
184194
Exit with a status of 2 if the total coverage is less than `MIN`.
@@ -216,6 +226,7 @@ COMMAND REFERENCE
216226
\--title `TITLE`
217227
Use the text string `TITLE` as the title on the HTML.
218228

229+
219230
**json** [ `option` ... ] [ `MODULE` ... ]
220231

221232
Generate a JSON report of coverage results.
@@ -225,7 +236,7 @@ COMMAND REFERENCE
225236

226237
\--data-file `INFILE`
227238
Read coverage data for report generation from this file.
228-
Defaults to '.coverage'.
239+
Defaults to ``.coverage``.
229240

230241
\--fail-under `MIN`
231242
Exit with a status of 2 if the total coverage is less than `MIN`.
@@ -253,6 +264,7 @@ COMMAND REFERENCE
253264
\--show-contexts
254265
Include information about the contexts that executed each line.
255266

267+
256268
**lcov** [ `option` ... ] [ `MODULE` ... ]
257269

258270
Create an LCOV report of the coverage results.
@@ -261,7 +273,7 @@ COMMAND REFERENCE
261273

262274
\--data-file `INFILE`
263275
Read coverage data for report generation from this file.
264-
Defaults to '.coverage'.
276+
Defaults to ``.coverage``.
265277

266278
\--fail-under `MIN`
267279
Exit with a status of 2 if the total coverage is less than `MIN`.
@@ -283,6 +295,7 @@ COMMAND REFERENCE
283295
\-q, --quiet
284296
Don't print messages about what is happening.
285297

298+
286299
**report** [ `option` ... ] [ `MODULE` ... ]
287300

288301
Report coverage statistics on each `MODULE`.
@@ -294,13 +307,13 @@ COMMAND REFERENCE
294307

295308
\--data-file `INFILE`
296309
Read coverage data for report generation from this file.
297-
Defaults to '.coverage'.
310+
Defaults to ``.coverage``.
298311

299312
\--fail-under `MIN`
300313
Exit with a status of 2 if the total coverage is less than `MIN`.
301314

302315
\--format `FORMAT`
303-
Output format, either text (default), markdown, or total.
316+
Output format, either ``text`` (default), ``markdown``, or ``total``.
304317

305318
\-i, --ignore-errors
306319
Ignore errors while reading source files.
@@ -331,8 +344,8 @@ COMMAND REFERENCE
331344
Skip files with no code.
332345

333346
\--sort `COLUMN`
334-
Sort the report by thee named column: `name`, `stmts`, `miss`,
335-
`branch`, `brpart`, or `cover`.
347+
Sort the report by the named column: ``name``, ``stmts``, ``miss``,
348+
``branch``, ``brpart``, or ``cover``.
336349

337350

338351
**run** [ `options` ... ] `PROGRAMFILE` [ `program_options` ]
@@ -350,15 +363,15 @@ COMMAND REFERENCE
350363

351364
\--concurrency `LIBS`
352365
Properly measure code using a concurrency library. Valid values are:
353-
thread, gevent, greenlet, eventlet, multiprocessing, or a comma-list of
354-
them.
366+
``thread``, ``gevent``, ``greenlet``, ``eventlet``,
367+
``multiprocessing``, or a comma-list of them.
355368

356369
\--context `CONTEXT`
357370
The context label to record for this coverage run.
358371

359372
\--data-file `OUTFILE`
360373
Write the recorded coverage data to this file.
361-
Defaults to '.coverage'.
374+
Defaults to ``.coverage``.
362375

363376
\--include `PATTERN` [ , ... ]
364377
Include only files whose paths match one of these
@@ -380,12 +393,17 @@ COMMAND REFERENCE
380393
``.coverage`` data file name to simplify collecting data from many
381394
processes.
382395

396+
\--save-signal `SIGNAL`
397+
Specify a signal that will trigger coverage to write its collected
398+
data. Supported values are: ``USR1``, ``USR2``.
399+
383400
\--source `SOURCE` ...
384401
A list of packages or directories of code to be measured.
385402

386403
\--timid
387404
Use the slower Python trace function core.
388405

406+
389407
**xml** [ `options` ... ] [ `MODULES` ... ]
390408

391409
Generate an XML report of coverage results on each `MODULE`.
@@ -394,7 +412,7 @@ COMMAND REFERENCE
394412

395413
\--data-file `INFILE`
396414
Read coverage data for report generation from this file.
397-
Defaults to '.coverage'.
415+
Defaults to ``.coverage``.
398416

399417
\--fail-under `MIN`
400418
Exit with a status of 2 if the total coverage is less than `MIN`.
@@ -423,6 +441,14 @@ COMMAND REFERENCE
423441
ENVIRONMENT VARIABLES
424442
=====================
425443

444+
COVERAGE_DEBUG
445+
446+
Debug options, same as for the ``--debug`` option.
447+
448+
COVERAGE_DEBUG_FILE
449+
450+
Where to write debug information, defaulting to stderr.
451+
426452
COVERAGE_FILE
427453

428454
Path to the file where coverage measurements are collected to and
@@ -432,6 +458,7 @@ COVERAGE_RCFILE
432458

433459
Path to the configuration file, often named ``.coveragerc``.
434460

461+
435462
HISTORY
436463
=======
437464

0 commit comments

Comments
 (0)