diff options
-rw-r--r-- | coverage/misc.py | 2 | ||||
-rw-r--r-- | doc/api.rst | 1 | ||||
-rw-r--r-- | doc/api_coverage.rst | 10 | ||||
-rw-r--r-- | doc/api_module.rst | 39 |
4 files changed, 42 insertions, 10 deletions
diff --git a/coverage/misc.py b/coverage/misc.py index 00e88fdb..3423170f 100644 --- a/coverage/misc.py +++ b/coverage/misc.py @@ -340,7 +340,7 @@ class BaseCoverageException(Exception): class CoverageException(BaseCoverageException): - """A run-of-the-mill exception specific to coverage.py.""" + """An exception raised by a coverage.py function.""" pass diff --git a/doc/api.rst b/doc/api.rst index eb63719c..6da5d4cb 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -49,6 +49,7 @@ only. :ref:`dbschema` explains more. :maxdepth: 1 api_coverage + api_module api_plugin api_coveragedata dbschema diff --git a/doc/api_coverage.rst b/doc/api_coverage.rst index 33433605..0a0e056f 100644 --- a/doc/api_coverage.rst +++ b/doc/api_coverage.rst @@ -9,17 +9,9 @@ The Coverage class .. :history: 20150802T174800, new file for 4.0b1 .. module:: coverage + :noindex: .. autoclass:: Coverage :members: :exclude-members: sys_info :special-members: __init__ - - -Starting coverage.py automatically -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This function is used to start coverage measurement automatically when Python -starts. See :ref:`subprocess` for details. - -.. autofunction:: process_startup diff --git a/doc/api_module.rst b/doc/api_module.rst new file mode 100644 index 00000000..0c993632 --- /dev/null +++ b/doc/api_module.rst @@ -0,0 +1,39 @@ +.. Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 +.. For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt + +.. _api_module: + +coverage module +--------------- + +.. module:: coverage + +The most important thing in the coverage module is the +:class:`coverage.Coverage` class, described in :ref:`api_coverage`, but there +are a few other things also. + + +.. data:: version_info + +A tuple of five elements, similar to :data:`sys.version_info +<python:sys.version_info>`: *major*, *minor*, *micro*, *releaselevel*, and +*serial*. All values except *releaselevel* are integers; the release level is +``'alpha'``, ``'beta'``, ``'candidate'``, or ``'final'``. Unlike +:data:`sys.version_info <python:sys.version_info>`, the elements are not +available by name. + +.. data:: __version__ + +A string with the version of coverage.py, for example, ``"5.0b2"``. + +.. autoclass:: CoverageException + + +Starting coverage.py automatically +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This function is used to start coverage measurement automatically when Python +starts. See :ref:`subprocess` for details. + +.. autofunction:: process_startup + |