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 | e5c5b0eda9c000987ecafaa914ff1d0513b342ac (patch) | |
tree | df1bf4876796c426515009d4d42287abcd70c2d8 /coverage/summary.py | |
parent | c9aa6917e8ae67640f14dcd302b30d2cbe234fa8 (diff) | |
download | python-coveragepy-git-e5c5b0eda9c000987ecafaa914ff1d0513b342ac.tar.gz |
Reporting doesn't work on Jython, so don't run reporting tests there.
--HG--
extra : amend_source : 144fd0ffb49fdef1139ae3f0085831ece14de43f
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 d94ce8b2..271b648a 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)) |