OLD | NEW |
1 """Reporter foundation for Coverage.""" | 1 """Reporter foundation for Coverage.""" |
2 | 2 |
3 import fnmatch, os | 3 import fnmatch, os |
4 from coverage.codeunit import code_unit_factory | 4 from coverage.codeunit import code_unit_factory |
5 from coverage.files import prep_patterns | 5 from coverage.files import prep_patterns |
6 from coverage.misc import CoverageException, NoSource, NotPython | 6 from coverage.misc import CoverageException, NoSource, NotPython |
7 | 7 |
8 class Reporter(object): | 8 class Reporter(object): |
9 """A base class for all reporters.""" | 9 """A base class for all reporters.""" |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 try: | 83 try: |
84 report_fn(cu, self.coverage._analyze(cu)) | 84 report_fn(cu, self.coverage._analyze(cu)) |
85 except NoSource: | 85 except NoSource: |
86 if not self.config.ignore_errors: | 86 if not self.config.ignore_errors: |
87 raise | 87 raise |
88 except NotPython: | 88 except NotPython: |
89 # Only report errors for .py files, and only if we didn't | 89 # Only report errors for .py files, and only if we didn't |
90 # explicitly suppress those errors. | 90 # explicitly suppress those errors. |
91 if cu.should_be_python() and not self.config.ignore_errors: | 91 if cu.should_be_python() and not self.config.ignore_errors: |
92 raise | 92 raise |
OLD | NEW |