diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2017-01-14 10:01:03 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2017-01-14 10:01:03 -0500 |
commit | 11ac7823c5b2239b9b9a38c7de0650eb1f9c99c0 (patch) | |
tree | 0dd176d31dda4244a8b23e1bcc466e30ed7f861d /coverage/summary.py | |
parent | 690541622755562969d07add1b1bdbeb3fdfe064 (diff) | |
download | python-coveragepy-11ac7823c5b2239b9b9a38c7de0650eb1f9c99c0.tar.gz |
Reporting doesn't work on Jython, so don't run reporting tests there.
Diffstat (limited to 'coverage/summary.py')
-rw-r--r-- | coverage/summary.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/coverage/summary.py b/coverage/summary.py index d94ce8b..271b648 100644 --- a/coverage/summary.py +++ b/coverage/summary.py @@ -8,7 +8,7 @@ import sys from coverage import env from coverage.report import Reporter from coverage.results import Numbers -from coverage.misc import NotPython, CoverageException, output_encoding +from coverage.misc import NotPython, CoverageException, output_encoding, StopEverything class SummaryReporter(Reporter): @@ -55,13 +55,16 @@ class SummaryReporter(Reporter): skipped_count += 1 continue fr_analysis.append((fr, analysis)) + except StopEverything: + # Don't report this on single files, it's a systemic problem. + raise except Exception: report_it = not self.config.ignore_errors if report_it: typ, msg = sys.exc_info()[:2] # NotPython is only raised by PythonFileReporter, which has a # should_be_python() method. - if typ is NotPython and not fr.should_be_python(): + if issubclass(typ, NotPython) and not fr.should_be_python(): report_it = False if report_it: writeout(fmt_err % (fr.relative_filename(), typ.__name__, msg)) |