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/misc.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/misc.py')
-rw-r--r-- | coverage/misc.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/coverage/misc.py b/coverage/misc.py index 5d330c6d..270c1468 100644 --- a/coverage/misc.py +++ b/coverage/misc.py @@ -10,6 +10,7 @@ import locale import os import sys import types +import unittest from coverage import env from coverage.backward import to_bytes, unicode_class @@ -264,3 +265,18 @@ class ExceptionDuringRun(CoverageException): """ pass + + +class StopEverything(unittest.SkipTest): + """An exception that means everything should stop. + + This derives from SkipTest so that tests that spring this trap will be + skipped automatically, without a lot of boilerplate all over the place. + + """ + pass + + +class IncapablePython(CoverageException, StopEverything): + """An operation is attempted that this version of Python cannot do.""" + pass |