diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2009-12-02 07:27:14 -0500 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-12-02 07:27:14 -0500 |
| commit | e2c55d3f8436cc91290897f9ef9d1a478b9d218d (patch) | |
| tree | aafeffb08566ad99b2ce16cf92fc5d5adabcaeba /doc | |
| parent | e657eb27575a5932d1bb5f488fe0643137943a6a (diff) | |
| download | python-coveragepy-e2c55d3f8436cc91290897f9ef9d1a478b9d218d.tar.gz | |
Massive eol whitespace clean-up.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/api.rst | 8 | ||||
| -rw-r--r-- | doc/branch.rst | 14 | ||||
| -rw-r--r-- | doc/changes.rst | 12 | ||||
| -rw-r--r-- | doc/cmd.rst | 8 | ||||
| -rw-r--r-- | doc/excluding.rst | 4 | ||||
| -rw-r--r-- | doc/index.rst | 6 |
6 files changed, 26 insertions, 26 deletions
diff --git a/doc/api.rst b/doc/api.rst index 17f74b6..98187a8 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -13,12 +13,12 @@ coverage object correspond to operations available in the command line interface. For example, a simple use would be:: import coverage - + cov = coverage.coverage() cov.start() - + # .. run your code .. - + cov.stop() cov.save() @@ -29,4 +29,4 @@ The coverage module .. module:: coverage .. autoclass:: coverage - :members: + :members: diff --git a/doc/branch.rst b/doc/branch.rst index 262ce1a..7e15603 100644 --- a/doc/branch.rst +++ b/doc/branch.rst @@ -18,9 +18,9 @@ For example:: if x: # 2 y = 10 # 3 return y # 4 - + my_partial_fn(1) - + In this code, line 2 is an ``if`` statement which can go next to either line 3 or line 4. Statement coverage would show all lines of the function as executed. But the if was never evaluated as false, so line 2 never jumps to line 4. @@ -35,7 +35,7 @@ How to measure branch coverage To measure branch coverage, run coverage.py with the ``--branch`` flag:: coverage run --branch myprog.py - + When you report on the results with ``coverage report`` or ``coverage html``, the percentage of branch possibilities taken will be included in the percentage covered total for each file. The coverage percentage for a file is the actual @@ -48,7 +48,7 @@ far right showing branch destination line numbers that were not exercised. The XML report produced by ``coverage xml`` also includes branch information, including separate statement and branch coverage percentages. Each line is -annotated with +annotated with How it works @@ -91,10 +91,10 @@ unconditional loop will be marked as partially executed:: while True: # line 1 if some_condition(): # 2 - break + break body_of_loop() # 4 - + keep_working() # 6 Because the loop never terminates naturally (jumping from line 1 to 6), -coverage.py considers the branch partially executed. +coverage.py considers the branch partially executed. diff --git a/doc/changes.rst b/doc/changes.rst index 97d9a8e..bdf0ac7 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -38,7 +38,7 @@ Version 3.2 - Some exceptions reported by the command line interface have been cleaned up
so that tracebacks inside coverage.py aren't shown. Fixes `issue 23`_.
-
+
- Fixed some problems syntax coloring sources with line continuations and
source with tabs: `issue 30`_ and `issue 31`_.
@@ -116,7 +116,7 @@ Version 3.0, 13 June 2009 other encouragement.
- The minimum supported Python version is 2.3.
-
+
- When using the object api (that is, constructing a coverage() object), data
is no longer saved automatically on process exit. You can re-enable it with
the ``auto_data=True`` parameter on the coverage() constructor.
@@ -130,12 +130,12 @@ Version 3.0, 13 June 2009 - Added parameters to coverage.__init__ for options that had been set on
the coverage object itself.
-
+
- Added clear_exclude() and get_exclude_list() methods for programmatic
manipulation of the exclude regexes.
-
+
- Added coverage.load() to read previously-saved data from the data file.
-
+
- coverage.annotate_file is no longer available.
-
+
- Removed the undocumented cache_file argument to coverage.usecache().
diff --git a/doc/cmd.rst b/doc/cmd.rst index 41de00c..ab93845 100644 --- a/doc/cmd.rst +++ b/doc/cmd.rst @@ -71,7 +71,7 @@ can set a new file name with the COVERAGE_FILE environment variable. By default each run of your program starts with an empty data set. If you need to run your program multiple times to get complete data (for example, because you need to supply disjoint options), you can accumulate data across runs with the ``-a`` -flag on the **run** command. +flag on the **run** command. To erase the collected data, use the **erase** command:: @@ -113,7 +113,7 @@ as a percentage. The ``-m`` flag also shows the line numbers of missing statements:: - $ coverage report -m + $ coverage report -m Name Stmts Exec Cover Missing ------------------------------------------------------- my_program 20 16 80% 33-35, 39 @@ -178,7 +178,7 @@ Coverage status for each line of source is indicated with a character prefix:: For example:: # A simple function, never called with x==1 - + > def h(x): """Silly function.""" - if 0: #pragma: no cover @@ -187,7 +187,7 @@ For example:: ! a = 1 > else: > a = 2 - + XML reporting ------------- diff --git a/doc/excluding.rst b/doc/excluding.rst index 1333f5c..1b91fc9 100644 --- a/doc/excluding.rst +++ b/doc/excluding.rst @@ -30,7 +30,7 @@ function is not reported as missing:: def __init__(self): blah1() blah2() - + def __repr__(self): # pragma: no cover return "<MyObject>" @@ -71,7 +71,7 @@ in debugging code, and are uninteresting to test themselves. You could exclude all of them by adding a regex to the exclusion list:: coverage.exclude('def __repr__') - + Here's a list of exclusions I've used:: coverage.exclude('def __repr__') diff --git a/doc/index.rst b/doc/index.rst index eff3106..5acbc9e 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -43,7 +43,7 @@ Getting started is easy: .. code-block:: console
- $ coverage report -m
+ $ coverage report -m
Name Stmts Exec Cover Missing
-------------------------------------------------------
my_program 20 16 80% 33-35, 39
@@ -53,7 +53,7 @@ Getting started is easy: #. For a nicer presentation, use ``coverage html`` to get annotated HTML
listings detailing missed lines:
-
+
.. code-block:: console
$ coverage html -d htmlcov
@@ -99,7 +99,7 @@ More information .. toctree::
:maxdepth: 1
-
+
cmd
api
excluding
|
