diff options
-rw-r--r-- | doc/changes.rst | 6 | ||||
-rw-r--r-- | doc/cmd.rst | 7 | ||||
-rw-r--r-- | doc/config.rst | 79 | ||||
-rw-r--r-- | doc/index.rst | 3 |
4 files changed, 91 insertions, 4 deletions
diff --git a/doc/changes.rst b/doc/changes.rst index a0a5d278..67f5e8aa 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -35,15 +35,15 @@ Version 3.3 combined with "coverage combine" are deleted after they're combined, to clean
up unneeded files. Fixes `issue 40`_.
-- Fixed a problem with nested loops having their branch possibilities
- mischaracterized: `issue 39`_.
-
- Exceptions thrown from product code run with "coverage run" are now displayed
without internal coverage.py frames, so the output is the same as when the
code is run without coverage.py.
+- Fixed `issue 39`_ and `issue 47`.
+
.. _issue 39: http://bitbucket.org/ned/coveragepy/issue/39
.. _issue 40: http://bitbucket.org/ned/coveragepy/issue/40
+.. _issue 47: http://bitbucket.org/ned/coveragepy/issue/47
Version 3.2, 5 December 2009
diff --git a/doc/cmd.rst b/doc/cmd.rst index ab93845e..08a966e4 100644 --- a/doc/cmd.rst +++ b/doc/cmd.rst @@ -9,6 +9,7 @@ Coverage command line usage :history: 20090913T084400, new command line syntax :history: 20091004T170700, changes for 3.1 :history: 20091127T200700, changes for 3.2 +:history: 20100223T200600, changes for 3.3 .. highlight:: console @@ -35,6 +36,12 @@ which determine the action performed: Help is available with ``coverage help``, or with the ``--help`` switch on any other command. +Version information for coverage.py can be displayed with ``--version``. + +Any command can use a configuration file by specifying it with the +``--rcfile=FILE`` command-line switch. See :ref:`Configuration Files <config>` +for more details. + Execution --------- diff --git a/doc/config.rst b/doc/config.rst new file mode 100644 index 00000000..355cf449 --- /dev/null +++ b/doc/config.rst @@ -0,0 +1,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): + diff --git a/doc/index.rst b/doc/index.rst index 053eb7b3..7274599e 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -57,7 +57,7 @@ Getting started is easy: .. code-block:: console
- $ coverage html -d htmlcov
+ $ coverage html
Then visit htmlcov/index.html in your browser, to see a
`report like this`__.
@@ -104,6 +104,7 @@ More information :maxdepth: 1
cmd
+ config
api
excluding
branch
|