Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: tools/telemetry/third_party/coverage/doc/python-coverage.1.txt

Issue 1366913004: Add coverage Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 ===============
2 python-coverage
3 ===============
4
5 -------------------------------------------------
6 measure code coverage of Python program execution
7 -------------------------------------------------
8
9 :Author: Ned Batchelder <ned@nedbatchelder.com>
10 :Author: |author|
11 :Date: 2015-09-20
12 :Copyright: Apache 2.0 license, attribution and disclaimer required.
13 :Manual section: 1
14 :Manual group: Coverage.py
15
16 .. |command| replace:: **python-coverage**
17
18 ..
19 To test this file:
20 $ rst2man < doc/python-coverage.1.txt | groff -man -Tascii
21
22
23 SYNOPSIS
24 ========
25
26 | |command| `command` [ `option` ... ]
27 | |command| **help** [ `command` ]
28
29
30 DESCRIPTION
31 ===========
32
33 |command| executes a Python program and measures which of its statements are
34 executed and which are not, and reports these coverage measurements.
35
36
37 COMMAND OVERVIEW
38 ================
39
40 |command| **annotate**
41 Annotate source files with execution information.
42
43 |command| **combine**
44 Combine a number of data files.
45
46 |command| **erase**
47 Erase previously collected coverage data.
48
49 |command| **help**
50 Get help on using coverage.py.
51
52 |command| **html**
53 Create an HTML report.
54
55 |command| **report**
56 Report coverage stats on modules.
57
58 |command| **run**
59 Run a Python program and measure code execution.
60
61 |command| **xml**
62 Create an XML report of coverage results.
63
64
65 GLOBAL OPTIONS
66 ==============
67
68 **--help**, **-h**
69 Describe how to use coverage.py, in general or a command.
70
71 **--rcfile** `RCFILE`
72 Specify configuration file `RCFILE`. Defaults to ``.coveragerc``.
73
74 **--omit** `PATTERN` [ , ... ]
75 Omit files when their file name matches one of these PATTERNs.
76 Usually needs quoting on the command line.
77
78 **--include** `PATTERN` [ , ... ]
79 Include only files whose paths match one of these
80 PATTERNs. Accepts shell-style wildcards, which must be quoted.
81
82 **--debug** `DEBUGOPT`,...
83 Debug options `DEBUGOPT`, separated by commas.
84
85
86
87 COMMAND REFERENCE
88 =================
89
90 **annotate**
91
92 Options:
93
94 \-d `DIR`, --directory=`DIR`
95 Write the output files to DIR.
96
97 \-i, --ignore-errors
98 Ignore errors while reading source files.
99
100 **combine** [ `PATH` ... ]
101
102 Combine data from multiple coverage files collected with ``run -p``.
103 The combined results are written to a single file representing the
104 union of the data.
105
106 If `PATH` is specified, they are files or directories containing data to
107 be combined.
108
109 **erase**
110
111 Erase previously collected coverage data.
112
113 **help** [ `command` ]
114
115 Describe how to use coverage.py.
116
117 **html** [ `option` ... ] [ `MODULE` ... ]
118
119 Create an HTML report of the coverage of each `MODULE` file. Each file
120 gets its own page, with the source decorated to show executed,
121 excluded, and missed lines.
122
123 Options:
124
125 \-d `DIR`, --directory `DIR`
126 Write the output files to `DIR`.
127
128 \--fail-under `MIN`
129 Exit with a status of 2 if the total coverage is less than `MIN`.
130
131 \-i, --ignore-errors
132 Ignore errors while reading source files.
133
134 \--title `TITLE`
135 Use the text string `TITLE` as the title on the HTML.
136
137 **report** [ `option` ... ] [ `MODULE` ... ]
138
139 Report coverage statistics on each `MODULE`.
140
141 Options:
142
143 \--fail-under `MIN`
144 Exit with a status of 2 if the total coverage is less than `MIN`.
145
146 \-i, --ignore-errors
147 Ignore errors while reading source files.
148
149 \-m, --show-missing
150 Show line numbers of statements in each module that weren't
151 executed.
152
153 \--skip-covered
154 Skip files with 100% coverage.
155
156 **run** [ `options` ... ] `PROGRAMFILE` [ `program_options` ]
157
158 Run a Python program `PROGRAMFILE`, measuring code execution.
159
160 Options:
161
162 \-a, --append
163 Append coverage data to .coverage, otherwise it is started clean
164 with each run.
165
166 \--branch
167 Measure branch coverage in addition to statement coverage.
168
169 \--concurrency `LIB`
170 Properly measure code using a concurrency library. Valid values are:
171 thread, gevent, greenlet, eventlet, multiprocessing.
172
173 \-L, --pylib
174 Measure coverage even inside the Python installed library, which
175 isn't done by default.
176
177 \-p, --parallel-mode
178 Append the machine name, process id and random number to the
179 ``.coverage`` data file name to simplify collecting data from many
180 processes.
181
182 \--source `SOURCE` ...
183 A list of packages or directories of code to be measured.
184
185 \--timid
186 Use a simpler but slower trace method. Try this if you get
187 seemingly impossible results!
188
189 **xml** [ `options` ... ] [ `MODULES` ... ]
190
191 Generate an XML report of coverage results on each `MODULE`.
192
193 Options:
194
195 \--fail-under `MIN`
196 Exit with a status of 2 if the total coverage is less than `MIN`.
197
198 \-i, --ignore-errors
199 Ignore errors while reading source files.
200
201 \-o `OUTFILE`
202 Write the XML report to `OUTFILE`. Defaults to ``coverage.xml``.
203
204
205 ENVIRONMENT VARIABLES
206 =====================
207
208 COVERAGE_FILE
209
210 Path to the file where coverage measurements are collected to and
211 reported from. Default: ``.coverage`` in the current working directory.
212
213 HISTORY
214 =======
215
216 The |command| command is a Python program which calls the ``coverage``
217 Python library to do all the work.
218
219 The library was originally developed by Gareth Rees, and is now developed
220 by Ned Batchelder.
221
222 This manual page was written by |author|.
223
224 .. |author| replace:: |authorname| |authoremail|
225 .. |authorname| replace:: Ben Finney
226 .. |authoremail| replace:: <ben+python@benfinney.id.au>
227
228 ..
229 Local variables:
230 mode: rst
231 coding: utf-8
232 time-stamp-format: "%:y-%02m-%02d"
233 time-stamp-start: "^:Date:[ ]+"
234 time-stamp-end: "$"
235 time-stamp-line-limit: 20
236 End:
237 vim: filetype=rst fileencoding=utf-8 :
OLDNEW
« no previous file with comments | « tools/telemetry/third_party/coverage/doc/plugins.rst ('k') | tools/telemetry/third_party/coverage/doc/requirements.pip » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698