diff options
Diffstat (limited to 'doc/api.rst')
| -rw-r--r-- | doc/api.rst | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/doc/api.rst b/doc/api.rst new file mode 100644 index 0000000..279e9db --- /dev/null +++ b/doc/api.rst @@ -0,0 +1,34 @@ +.. _api: + +============ +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 + :members: |
