diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-05-24 22:36:54 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-05-24 22:36:54 -0400 |
commit | 53ddcde9f0af2476a75f32765353543832a655f1 (patch) | |
tree | 8dc78808b7d9967986b8128f2efde5555cb437e6 /doc/index.rst | |
parent | e616185884ccade437bff4d75cc1c22958504878 (diff) | |
download | python-coveragepy-git-53ddcde9f0af2476a75f32765353543832a655f1.tar.gz |
Adding meat to the docs
Diffstat (limited to 'doc/index.rst')
-rw-r--r-- | doc/index.rst | 50 |
1 files changed, 34 insertions, 16 deletions
diff --git a/doc/index.rst b/doc/index.rst index e3492d05..3d68da50 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -2,6 +2,9 @@ coverage.py
===========
+:history: 20090524T134300, brand new docs.
+:history: 20090524T134301, tweaked.
+
.. toctree::
:hidden:
@@ -9,6 +12,15 @@ coverage.py api
+.. FAQ
+.. Why do unexecutable lines show up as executed?
+.. Why do the bodies of fns show as executed, but the def lines do not?
+.. Change History
+.. Getting Help
+.. How it works
+.. .coverage file format
+.. Excluding lines
+
Coverage.py is a tool for measuring code coverage of Python programs. It monitors
your program, noting which parts of the code have been executed, then analyzes the
source to identify code that could have been executed but was not.
@@ -17,29 +29,35 @@ source to identify code that could have been executed but was not. Quick Start
-----------
-Install coverage.py from the cheeseshop.
+Getting started with coverage.py is easy:
+
+#. Install coverage.py from the `coverage page on the cheeseshop <http://pypi.python.org/pypi/coverage>`_.
-Run coverage.py to execute your program and gather data::
+#. Run coverage.py to execute your program and gather data::
- $ coverage -e -x my_program.py
- blah blah your program's output blah blah
+ $ coverage -e -x my_program.py arg1 arg2
+ blah blah ..your program's output.. blah blah
+
+ "-e -x" means erase coverage data from previous runs and execute a program.
-Run coverage.py to report on the results::
+#. Run coverage.py to report on the results::
+
+ $ coverage -r -m
+ Name Stmts Exec Cover Missing
+ -------------------------------------------------------
+ my_program 20 16 80% 33-35, 39
+ my_other_module 56 50 89% 17-23
+ -------------------------------------------------------
+ TOTAL 76 66 87%
- $ coverage -r -m
- Name Stmts Exec Cover Missing
- -------------------------------------------------------
- my_program 20 16 80% 33-35, 39
- my_other_module 56 50 89% 517-523
- -------------------------------------------------------
- TOTAL 76 66 87%
+ "-r -m" means show a summary report and include the missing line numbers.
-For a nicer presentation, run coverage.py to get annotated HTML listings
-detailing missed lines::
+#. For a nicer presentation, run coverage.py to get annotated HTML listings
+ detailing missed lines::
- coverage -b -d htmlcov
+ coverage -b -d htmlcov
-Then visit htmlcov/index.html in your browser.
+ Then visit htmlcov/index.html in your browser.
Using coverage.py
|