Package testoob :: Module coverage :: Class Coverage
[show private | hide private]
[frames | no frames]

Class Coverage


Python code coverage module built specifically for checking code coverage in tests performed by Testoob.

NOTE: This class depends on the 'trace' module.
Method Summary
  __init__(self, ignorepaths)
initialize the code coverage module, gets list of directories and files which's coverage is not needed.
  getstatistics(self)
Returns a dictionary of statistics.
  runfunc(self, func, *args, **kwargs)
Runs the function with arguments and keyword arguments, and checks the code coverage.
  total_coverage_percentage(self)
  total_lines(self)
  total_lines_covered(self)

Method Details

__init__(self, ignorepaths=())
(Constructor)

initialize the code coverage module, gets list of directories and files which's coverage is not needed.

getstatistics(self)

Returns a dictionary of statistics. the dictionary maps between a
filename and the statistics associated to it.

The statistics dictionary has 3 keys:
    lines   - the number of executable lines in the file
    covered - the number of lines covered in the file
    percent - the percentage of covered lines.

This dictionary also has a special "file" (key) called '__total__',
which holds the statistics for all the files together.

runfunc(self, func, *args, **kwargs)

Runs the function with arguments and keyword arguments, and checks the code coverage.

Generated by Epydoc 2.1 on Sun Dec 3 15:27:57 2006 http://epydoc.sf.net