diff options
-rw-r--r-- | coverage/control.py | 14 | ||||
-rw-r--r-- | coverage/data.py | 32 | ||||
-rw-r--r-- | doc/api_coverage.rst | 6 | ||||
-rw-r--r-- | doc/api_coveragedata.rst | 4 |
4 files changed, 30 insertions, 26 deletions
diff --git a/coverage/control.py b/coverage/control.py index 3141c82a..d74aa888 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -654,10 +654,10 @@ class Coverage(object): """Start measuring code coverage. Coverage measurement actually occurs in functions called after - :meth:`.start` is invoked. Statements in the same scope as - :meth:`.start` won't be measured. + :meth:`start` is invoked. Statements in the same scope as + :meth:`start` won't be measured. - Once you invoke :meth:`.start`, you must also call :meth:`.stop` + Once you invoke :meth:`start`, you must also call :meth:`stop` eventually, or your process might not shut down cleanly. """ @@ -738,7 +738,7 @@ class Coverage(object): def get_exclude_list(self, which='exclude'): """Return a list of excluded regex patterns. - `which` indicates which list is desired. See :meth:`.exclude` for the + `which` indicates which list is desired. See :meth:`exclude` for the lists that are available, and their meaning. """ @@ -972,7 +972,7 @@ class Coverage(object): marker to indicate the coverage of the line. Covered lines have ">", excluded lines have "-", and missing lines have "!". - See :meth:`.report` for other arguments. + See :meth:`report` for other arguments. """ self.get_data() @@ -996,7 +996,7 @@ class Coverage(object): `title` is a text string (not HTML) to use as the title of the HTML report. - See :meth:`.report` for other arguments. + See :meth:`report` for other arguments. Returns a float, the total percentage covered. @@ -1020,7 +1020,7 @@ class Coverage(object): Each module in `morfs` is included in the report. `outfile` is the path to write the file to, "-" will write to stdout. - See :meth:`.report` for other arguments. + See :meth:`report` for other arguments. Returns a float, the total percentage covered. diff --git a/coverage/data.py b/coverage/data.py index 3491c3d8..eed9406a 100644 --- a/coverage/data.py +++ b/coverage/data.py @@ -52,32 +52,32 @@ class CoverageData(object): names in this API are case-sensitive, even on platforms with case-insensitive file systems. - To read a coverage.py data file, use :meth:`.read_file`, or :meth:`.read` + To read a coverage.py data file, use :meth:`read_file`, or :meth:`read` if you have an already-opened file. You can then access the line, arc, or - file tracer data with :meth:`.lines`, :meth:`.arcs`, or - :meth:`.file_tracer`. Run information is available with - :meth:`.run_infos`. + file tracer data with :meth:`lines`, :meth:`arcs`, or + :meth:`file_tracer`. Run information is available with + :meth:`run_infos`. - The :meth:`.has_arcs` method indicates whether arc data is available. You - can get a list of the files in the data with :meth:`.measured_files`. - A summary of the line data is available from :meth:`.line_counts`. As with + The :meth:`has_arcs` method indicates whether arc data is available. You + can get a list of the files in the data with :meth:`measured_files`. + A summary of the line data is available from :meth:`line_counts`. As with most Python containers, you can determine if there is any data at all by using this object as a boolean value. Most data files will be created by coverage.py itself, but you can use - methods here to create data files if you like. The :meth:`.set_lines`, - :meth:`.set_arcs`, and :meth:`.set_file_tracers` methods add data, in ways - that are convenient for coverage.py. The :meth:`.add_run_info` method adds + methods here to create data files if you like. The :meth:`set_lines`, + :meth:`set_arcs`, and :meth:`set_file_tracers` methods add data, in ways + that are convenient for coverage.py. The :meth:`add_run_info` method adds key-value pairs to the run information. - To add a file without any measured data, use :meth:`.touch_file`. + To add a file without any measured data, use :meth:`touch_file`. - You write to a named file with :meth:`.write_file`, or to an already opened - file with :meth:`.write`. + You write to a named file with :meth:`write_file`, or to an already opened + file with :meth:`write`. - You can clear the data in memory with :meth:`.erase`. Two data collections - can be combined by using :meth:`.update` on one :class:`CoverageData`, + You can clear the data in memory with :meth:`erase`. Two data collections + can be combined by using :meth:`update` on one :class:`CoverageData`, passing it the other. """ @@ -621,7 +621,7 @@ class CoverageDataFiles(object): combine. Directories are searched for files that start with `self.filename` plus dot as a prefix, and those files are combined. - If `data_dirs` is not provided, then the directory portion of + If `data_paths` is not provided, then the directory portion of `self.filename` is used as the directory to search for data files. Every data file found and combined is then deleted from disk. diff --git a/doc/api_coverage.rst b/doc/api_coverage.rst index 153ca2c5..4aa71719 100644 --- a/doc/api_coverage.rst +++ b/doc/api_coverage.rst @@ -8,7 +8,9 @@ The Coverage class ------------------ -.. autoclass:: coverage.Coverage +.. automodule:: coverage + +.. autoclass:: Coverage :members: :exclude-members: use_cache, sys_info :special-members: __init__ @@ -20,4 +22,4 @@ Starting coverage.py automatically This function is used to start coverage measurement automatically when Python starts. See :ref:`subprocess` for details. -.. autofunction:: coverage.process_startup +.. autofunction:: process_startup diff --git a/doc/api_coveragedata.rst b/doc/api_coveragedata.rst index 9b88bb7c..7e7a9a5f 100644 --- a/doc/api_coveragedata.rst +++ b/doc/api_coveragedata.rst @@ -10,6 +10,8 @@ The CoverageData class .. versionadded:: 4.0 -.. autoclass:: coverage.CoverageData +.. automodule:: coverage + +.. autoclass:: CoverageData :members: :special-members: __init__ |