summaryrefslogtreecommitdiff
path: root/coverage/summary.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/summary.py')
-rw-r--r--coverage/summary.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/coverage/summary.py b/coverage/summary.py
index 7348aca..696f6b3 100644
--- a/coverage/summary.py
+++ b/coverage/summary.py
@@ -14,10 +14,16 @@ class SummaryReporter(Reporter):
self.show_missing = show_missing
self.branches = coverage.data.has_arcs()
- def report(self, morfs, omit_prefixes=None, outfile=None):
- """Writes a report summarizing coverage statistics per module."""
+ def report(self, morfs, omit_prefixes=None, outfile=None, require_prefixes=None):
+ """Writes a report summarizing coverage statistics per module.
- self.find_code_units(morfs, omit_prefixes)
+ `omit_prefixes` is a list of prefixes. CodeUnits that match those prefixes
+ will be omitted from the list.
+ `require_prefixes` is a list of prefixes. Only CodeUnits that match those prefixes
+ will be included in the list.
+ You are required to pass at most one of `omit_prefixes` and `require_prefixes`.
+ """
+ self.find_code_units(morfs, omit_prefixes, require_prefixes)
# Prepare the formatting strings
max_name = max([len(cu.name) for cu in self.code_units] + [5])