diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-08-02 11:45:41 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-08-02 11:45:41 -0400 |
commit | f9b9abb5b81bd9efbb7f8b283d28af2bbf7808c7 (patch) | |
tree | 728bc1f785c7fa2bf25a8e1b1019273e7e7b7f16 /coverage/data.py | |
parent | 4031cbbe269ad31b63b9533dca2fa22510bcb3ba (diff) | |
download | python-coveragepy-f9b9abb5b81bd9efbb7f8b283d28af2bbf7808c7.tar.gz |
Split the api docs into separate pages.
The :meth: references are annoying, and some aren't right yet. :(
Diffstat (limited to 'coverage/data.py')
-rw-r--r-- | coverage/data.py | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/coverage/data.py b/coverage/data.py index 0fa2c87..56233e5 100644 --- a/coverage/data.py +++ b/coverage/data.py @@ -22,13 +22,15 @@ class CoverageData(object): This class is the public supported API to the data coverage.py collects during program execution. It includes information about what code was + executed. It does not include information from the analysis phase, to + determine what lines could have been executed, or what lines were not executed. .. note:: The file format is not documented or guaranteed. It will change in - the future, in possibly complicated ways. Use this API to avoid - disruption. + the future, in possibly complicated ways. Do not read coverage.py + data files directly. Use this API to avoid disruption. There are a number of kinds of data that can be collected: @@ -46,32 +48,33 @@ class CoverageData(object): written during "coverage run", and then accumulated during "coverage combine". - 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`. + 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`. - 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 `CoverageData`, passing it - the other. + 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. """ |