summaryrefslogtreecommitdiff
path: root/coverage/parser.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/parser.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/parser.py')
-rw-r--r--coverage/parser.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/coverage/parser.py b/coverage/parser.py
index 540ad09..54603bf 100644
--- a/coverage/parser.py
+++ b/coverage/parser.py
@@ -16,7 +16,7 @@ from coverage.backward import bytes_to_ints, string_class
from coverage.bytecode import CodeObjects
from coverage.debug import short_stack
from coverage.misc import contract, new_contract, nice_pair, join_regex
-from coverage.misc import CoverageException, NoSource, NotPython
+from coverage.misc import NoSource, IncapablePython, NotPython
from coverage.phystokens import compile_unicode, generate_tokens, neuter_encoding_declaration
@@ -371,11 +371,11 @@ class ByteParser(object):
# Alternative Python implementations don't always provide all the
# attributes on code objects that we need to do the analysis.
- for attr in ['co_lnotab', 'co_firstlineno', 'co_consts']:
+ for attr in ['co_lnotab', 'co_firstlineno']:
if not hasattr(self.code, attr):
- raise CoverageException(
+ raise IncapablePython( # pragma: only jython
"This implementation of Python doesn't support code analysis.\n"
- "Run coverage.py under CPython for this command."
+ "Run coverage.py under another Python for this command."
)
def child_parsers(self):