summaryrefslogtreecommitdiff
path: root/doc/api.rst
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-05-26 23:41:24 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-05-26 23:41:24 -0400
commita70319af59dc99373fa1b8febd0bbf86b6ca5200 (patch)
treee1c4f9cf247b7318c5fc4123d5ab714b430d609c /doc/api.rst
parentc77c6649d8438762f20fd9e15cf6c4cc9b94643b (diff)
downloadpython-coveragepy-a70319af59dc99373fa1b8febd0bbf86b6ca5200.tar.gz
First successful coversion .rst -> .px -> .html
Diffstat (limited to 'doc/api.rst')
-rw-r--r--doc/api.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/api.rst b/doc/api.rst
index 285ca3d..279e9db 100644
--- a/doc/api.rst
+++ b/doc/api.rst
@@ -4,6 +4,30 @@
Coverage API
============
+The API to coverage.py is very simple, contained in a single module called
+coverage containing a single class, also called coverage::
+
+ import coverage
+
+ cov = coverage.coverage()
+
+Methods on the 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()
+
+
+The coverage module
+-------------------
+
.. module:: coverage
.. autoclass:: coverage