'\" -*- coding: utf-8 -*- .\" Man page generated from reStructuredText. . .TH PYTHON-COVERAGE 1 "2017-09-08" "" "Coverage" .SH NAME python-coverage \- measure code coverage of Python program execution . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .nf \fBpython\-coverage\fP \fIcommand\fP [ \fIoption\fP ... ] \fBpython\-coverage\fP \fBhelp\fP [ \fIcommand\fP ] .fi .sp .SH DESCRIPTION .sp \fBpython\-coverage\fP executes a Python program, measures which of its statements are executed and which are not, and reports these coverage measurements. .SH COMMAND OVERVIEW .INDENT 0.0 .TP .B \fBpython\-coverage\fP \fBannotate\fP Annotate source files with execution information. .TP .B \fBpython\-coverage\fP \fBcombine\fP Combine a number of data files. .TP .B \fBpython\-coverage\fP \fBdebug\fP Display diagnostic information about the internals of this program. .TP .B \fBpython\-coverage\fP \fBerase\fP Erase previously collected coverage data. .TP .B \fBpython\-coverage\fP \fBhelp\fP Get help on using coverage.py. .TP .B \fBpython\-coverage\fP \fBhtml\fP Create an HTML report. .TP .B \fBpython\-coverage\fP \fBreport\fP Report coverage stats on modules. .TP .B \fBpython\-coverage\fP \fBrun\fP Run a Python program and measure code execution. .TP .B \fBpython\-coverage\fP \fBxml\fP Create an XML report of coverage results. .UNINDENT .SH GLOBAL OPTIONS .INDENT 0.0 .TP .B \fB\-\-help\fP, \fB\-h\fP Describe how to use Coverage, in general or a command. .TP .B \fB\-\-rcfile\fP \fIRCFILE\fP Specify configuration file \fIRCFILE\fP\&. Defaults to \fB\&.coveragerc\fP\&. .TP .B \fB\-\-omit\fP \fIPATTERN\fP ... Omit files when their filename matches one of these PATTERNs. Usually needs quoting on the command line. .TP .B \fB\-\-include\fP \fIPATTERN\fP ... Include files only when their filename path matches one of these PATTERNs. Usually needs quoting on the command line. .UNINDENT .SH COMMAND REFERENCE .sp \fBannotate\fP .INDENT 0.0 .INDENT 3.5 Options: .INDENT 0.0 .TP .B \-d \fIDIR\fP, \-\-directory \fIDIR\fP Write the output files to DIR. .TP .B \-i, \-\-ignore\-errors Ignore errors while reading source files. .UNINDENT .UNINDENT .UNINDENT .sp \fBcombine\fP \fIPATH\fP \fIPATH\fP [ ... ] .INDENT 0.0 .INDENT 3.5 Combine data from multiple coverage files \fIPATH\fP, collected with \fBrun \-p\fP\&. The combined results are written to a single file representing the union of the data. .UNINDENT .UNINDENT .sp \fBdebug\fP \fItopic\fP .INDENT 0.0 .INDENT 3.5 Display information on the internals of coverage.py, for diagnosing problems. .sp Topics are: .INDENT 0.0 .IP \(bu 2 \fIdata\fP, to show a summary of the collected data. .IP \(bu 2 \fIsys\fP, to show installation information. .UNINDENT .UNINDENT .UNINDENT .sp \fBerase\fP .INDENT 0.0 .INDENT 3.5 Erase previously collected coverage data. .UNINDENT .UNINDENT .sp \fBhelp\fP [ \fIcommand\fP ] .INDENT 0.0 .INDENT 3.5 Describe how to use Coverage. .UNINDENT .UNINDENT .sp \fBhtml\fP [ \fIoption\fP ... ] [ \fIMODULE\fP ... ] .INDENT 0.0 .INDENT 3.5 Create an HTML report of the coverage of each \fIMODULE\fP file. Each file gets its own page, with the source decorated to show executed, excluded, and missed lines. .sp Options: .INDENT 0.0 .TP .B \-d \fIDIR\fP, \-\-directory \fIDIR\fP Write the output files to \fIDIR\fP\&. .TP .B \-\-title \fITITLE\fP Use the text string \fITITLE\fP as the title on the HTML. .TP .B \-\-fail\-under \fIMIN\fP Exit with a status of 2 if the total coverage is less than \fIMIN\fP\&. .TP .B \-i, \-\-ignore\-errors Ignore errors while reading source files. .UNINDENT .UNINDENT .UNINDENT .sp \fBreport\fP [ \fIoption\fP ... ] [ \fIMODULE\fP ... ] .INDENT 0.0 .INDENT 3.5 Report coverage statistics on each \fIMODULE\fP\&. .sp Options: .INDENT 0.0 .TP .B \-\-fail\-under \fIMIN\fP Exit with a status of 2 if the total coverage is less than \fIMIN\fP\&. .TP .B \-i, \-\-ignore\-errors Ignore errors while reading source files. .TP .B \-m, \-\-show\-missing Show line numbers of statements in each module that weren\(aqt executed. .UNINDENT .UNINDENT .UNINDENT .sp \fBrun\fP [ \fIoptions\fP ... ] \fIPROGRAMFILE\fP [ \fIprogram_options\fP ] .INDENT 0.0 .INDENT 3.5 Run a Python program \fIPROGRAMFILE\fP, measuring code execution. .sp Options: .INDENT 0.0 .TP .B \-a, \-\-append Append coverage data to .coverage, otherwise it is started clean with each run. .TP .B \-\-branch Measure branch coverage in addition to statement coverage. .TP .B \-\-debug \fIDEBUGOPT\fP,... Debug options \fIDEBUGOPT\fP, separated by commas .TP .B \-L, \-\-pylib Measure coverage even inside the Python installed library, which isn\(aqt done by default. .TP .B \-p, \-\-parallel\-mode Append the machine name, process id and random number to the \fB\&.coverage\fP data file name to simplify collecting data from many processes. .TP .B \-\-timid Use a simpler but slower trace method. Try this if you get seemingly impossible results! .TP .B \-\-source \fISOURCE\fP ... A list of packages or directories of code to be measured. .UNINDENT .UNINDENT .UNINDENT .sp \fBxml\fP [ \fIoptions\fP ... ] [ \fIMODULES\fP ... ] .INDENT 0.0 .INDENT 3.5 Generate an XML report of coverage results on each \fIMODULE\fP\&. .sp Options: .INDENT 0.0 .TP .B \-\-fail\-under \fIMIN\fP Exit with a status of 2 if the total coverage is less than \fIMIN\fP\&. .TP .B \-i, \-\-ignore\-errors Ignore errors while reading source files. .TP .B \-o \fIOUTFILE\fP Write the XML report to \fIOUTFILE\fP\&. Defaults to \fBcoverage.xml\fP\&. .UNINDENT .UNINDENT .UNINDENT .SH ENVIRONMENT VARIABLES .sp COVERAGE_FILE .INDENT 0.0 .INDENT 3.5 Path to the file where coverage measurements are collected to and reported from. Default: \fB\&.coverage\fP in the current working directory. .UNINDENT .UNINDENT .sp COVERAGE_OPTIONS .INDENT 0.0 .INDENT 3.5 Space\-separated series of command\-line options to \fBpython\-coverage\fP\&. Default: empty. .UNINDENT .UNINDENT .SH HISTORY .sp The \fBpython\-coverage\fP command is a Python program which calls the \fBcoverage\fP Python library to do all the work. .sp The library was originally developed by Gareth Rees, and is now developed by Ned Batchelder. .sp This manual page was written to document the \fBpython\-coverage\fP command for Debian. This is free software: you may copy, modify and/or distribute this work under the terms of the \fI\%GNU General Public License, version 3 or later\fP as published by the Free Software Foundation, version 3 or later. No warranty expressed or implied. .sp On Debian systems, the complete text of the GNU General Public License version 3 can be found in the file \fI/usr/share/common\-licenses/GPL\-3\fP\&. .\" Local variables: .\" coding: utf-8 .\" mode: text .\" mode: rst .\" time-stamp-format: "%:y-%02m-%02d" .\" time-stamp-start: "^:Date:[ ]+" .\" time-stamp-end: "$" .\" time-stamp-line-limit: 20 .\" End: .\" vim: fileencoding=utf-8 filetype=rst : . .SH AUTHOR Ben Finney .SH COPYRIGHT Copyright © 2010–2017 Ben Finney .\" Generated by docutils manpage writer. .