Package nltk :: Package test :: Module coverage :: Class coverage
[hide private]
[frames] | no frames]

Class coverage

source code

Instance Methods [hide private]
 
__init__(self) source code
 
t(self, f, w, unused) source code
 
help(self, error=None) source code
 
command_line(self, argv, help_fn=None) source code
 
use_cache(self, usecache, cache_file=None) source code
 
get_ready(self, parallel_mode=False) source code
 
start(self, parallel_mode=False) source code
 
stop(self) source code
 
erase(self) source code
 
exclude(self, re) source code
 
begin_recursive(self) source code
 
end_recursive(self) source code
 
save(self) source code
 
restore(self) source code
 
restore_file(self, file_name) source code
 
collect(self) source code
 
merge_data(self, new_data) source code
 
merge_file_data(self, cache_data, new_data) source code
 
canonical_filename(self, filename) source code
 
canonicalize_filenames(self) source code
 
morf_filename(self, morf) source code
 
analyze_morf(self, morf) source code
 
analyze_morf2(self, morf) source code
 
first_line_of_tree(self, tree) source code
 
last_line_of_tree(self, tree) source code
 
find_docstring_pass_pair(self, tree, spots) source code
 
is_string_constant(self, tree) source code
 
is_pass_stmt(self, tree) source code
 
record_multiline(self, spots, i, j) source code
 
get_suite_spots(self, tree, spots)
Analyze a parse tree to find suite introducers which span a number of lines.
source code
 
find_executable_statements(self, text, exclude=None) source code
 
find_executable_statements2(self, text, exclude=None) source code
 
format_lines(self, statements, lines) source code
 
analysis(self, morf) source code
 
analysis2(self, morf) source code
 
analysis3(self, morf) source code
 
find_def_coverage(self, morf, statements, missing, definfo)
Return mapping from function name to coverage.
source code
 
relative_filename(self, filename)
Convert filename to relative filename from self.relative_dir.
source code
 
morf_name(self, morf)
Return the name of morf as used in report.
source code
 
filter_by_prefix(self, morfs, omit_prefixes)
Return list of morfs where the morf name does not begin with any one of the omit_prefixes.
source code
 
morf_name_compare(self, x, y) source code
 
report(self, morfs, show_missing=1, ignore_errors=0, file=None, omit_prefixes=[]) source code
 
annotate(self, morfs, directory=None, ignore_errors=0, omit_prefixes=[]) source code
 
annotate_file(self, filename, statements, excluded, missing, directory=None) source code
Class Variables [hide private]
  cache_default = '.coverage'
  cache_env = 'COVERAGE_FILE'
  c = {}
  cexecuted = {}
  analysis_cache = {}
  canonical_filename_cache = {}
  blank_re = re.compile(r'\s*(#|$)')
  else_re = re.compile(r'\s*else\s*:\s*(#|$)')