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
commite5c5b0eda9c000987ecafaa914ff1d0513b342ac (patch)
treedf1bf4876796c426515009d4d42287abcd70c2d8 /coverage/parser.py
parentc9aa6917e8ae67640f14dcd302b30d2cbe234fa8 (diff)
downloadpython-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/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 540ad098..54603bf3 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):