diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2010-05-23 16:09:44 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2010-05-23 16:09:44 -0400 |
commit | cd1b610a9645b0a3a53ce1c2779236c40e5d2164 (patch) | |
tree | 2a27b44eb82048020b5f83b487001d2d67e13bb6 /coverage/report.py | |
parent | 88eef7d43f1056d8ff65ca260fa7f28e49f4bfc1 (diff) | |
download | python-coveragepy-cd1b610a9645b0a3a53ce1c2779236c40e5d2164.tar.gz |
Omit and include are now filename patterns rather than prefixes. BACKWARD INCOMPATIBLE change.
Diffstat (limited to 'coverage/report.py')
-rw-r--r-- | coverage/report.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/coverage/report.py b/coverage/report.py index a676e18..f7662a3 100644 --- a/coverage/report.py +++ b/coverage/report.py @@ -24,34 +24,32 @@ class Reporter(object): # classes. self.directory = None - def find_code_units(self, morfs, omit_prefixes, include_prefixes): + def find_code_units(self, morfs, omit, include): """Find the code units we'll report on. - `morfs` is a list of modules or filenames. `omit_prefixes` is a list - of prefixes to leave out of the list. + `morfs` is a list of modules or filenames. See `coverage.report()` for other arguments. """ morfs = morfs or self.coverage.data.executed_files() self.code_units = code_unit_factory( - morfs, self.coverage.file_locator, omit_prefixes, - include_prefixes + morfs, self.coverage.file_locator, omit, include ) self.code_units.sort() def report_files(self, report_fn, morfs, directory=None, - omit_prefixes=None, include_prefixes=None): + omit=None, include=None): """Run a reporting function on a number of morfs. `report_fn` is called for each relative morf in `morfs`. - `include_prefixes` is a list of filename prefixes. CodeUnits that match - those prefixes will be included in the list. CodeUnits that match - `omit_prefixes` will be omitted from the list. + `include` is a list of filename patterns. CodeUnits that match + those patterns will be included in the list. CodeUnits that match + `omit` will be omitted from the list. """ - self.find_code_units(morfs, omit_prefixes, include_prefixes) + self.find_code_units(morfs, omit, include) if not self.code_units: raise CoverageException("No data to report.") |