summaryrefslogtreecommitdiff
path: root/doc/config.rst
blob: 355cf44929957375abe29219a9480c8afb7da092 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
.. _config:

===================
Configuration files
===================

:history: 20100223T201600, new for 3.3

Coverage.py options can be specified in a configuration file.  This makes it
easier to re-run coverage with consistent settings, and also allows for
specification of options that are otherwise only available in the
:ref:`API <api>`.

Configuration files also make it easier to get coverage testing of spawned
sub-processes.  See :ref:`Subprocess measurement <subprocess>` for more details.



Syntax
------

A coverage.py configuration file is in classic .ini file format: sections are
introduced by a ``[section]`` header, and contain ``name = value`` entries.
Lines beginning with ``#`` or ``;`` are ignored as comments.

Multi-line entries can be created by indenting values on multiple lines.

Boolean values can be specified as ``on``, ``off``, ``true``, ``false``, ``1``,
or ``0``.

Many sections and values correspond roughly to commands and options in the
command-line interface.


[run]
-----

These values are generally used when running product code, though some apply
to more than one command.

``branch`` (boolean): whether to measure :ref:`branch coverage <branch>`.

``cover_pylib`` (boolean): whether to measure the Python standard library.

``data_file`` (string): the name of the data file to use for storing or
reporting coverage.

``parallel`` (boolean):

``timid`` (boolean):


[report]
--------

Values common to many kinds of reporting.

``exclude_lines`` (multi-string):

``ignore_errors`` (boolean):

``omit`` (multi-string):


[html]
------

Values particular to HTML reporting.

``directory`` (string):


[xml]
-----

Values particular to XML reporting.

``output`` (string):