From 11ac7823c5b2239b9b9a38c7de0650eb1f9c99c0 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 14 Jan 2017 10:01:03 -0500 Subject: Reporting doesn't work on Jython, so don't run reporting tests there. --- coverage/parser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'coverage/parser.py') 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): -- cgit v1.2.1