diff options
Diffstat (limited to 'doc/api.rst')
| -rw-r--r-- | doc/api.rst | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/api.rst b/doc/api.rst index 285ca3d1..279e9dbb 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 |
