summaryrefslogtreecommitdiff
path: root/coverage/misc.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2017-01-14 10:01:03 -0500
committerNed Batchelder <ned@nedbatchelder.com>2017-01-14 10:01:03 -0500
commit11ac7823c5b2239b9b9a38c7de0650eb1f9c99c0 (patch)
tree0dd176d31dda4244a8b23e1bcc466e30ed7f861d /coverage/misc.py
parent690541622755562969d07add1b1bdbeb3fdfe064 (diff)
downloadpython-coveragepy-11ac7823c5b2239b9b9a38c7de0650eb1f9c99c0.tar.gz
Reporting doesn't work on Jython, so don't run reporting tests there.
Diffstat (limited to 'coverage/misc.py')
-rw-r--r--coverage/misc.py16
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