diff options
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 5d330c6..270c146 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 |