diff options
-rw-r--r-- | coverage/parser.py | 4 | ||||
-rw-r--r-- | lab/branches.py | 2 | ||||
-rw-r--r-- | lab/disgen.py | 6 | ||||
-rw-r--r-- | tests/test_arcs.py | 4 |
4 files changed, 9 insertions, 7 deletions
diff --git a/coverage/parser.py b/coverage/parser.py index 32a75900..16419ca4 100644 --- a/coverage/parser.py +++ b/coverage/parser.py @@ -142,7 +142,7 @@ class PythonParser(object): indent -= 1 elif toktype == token.NAME: if ttext == 'class': - # Class definitions look like branches in the byte code, so + # Class definitions look like branches in the bytecode, so # we need to exclude them. The simplest way is to note the # lines with the 'class' keyword. self.raw_classdefs.add(slineno) @@ -720,7 +720,7 @@ class AstArcAnalyzer(object): class ByteParser(object): - """Parse byte codes to understand the structure of code.""" + """Parse bytecode to understand the structure of code.""" @contract(text='unicode') def __init__(self, text, code=None, filename=None): diff --git a/lab/branches.py b/lab/branches.py index 275eef4a..d1908d0f 100644 --- a/lab/branches.py +++ b/lab/branches.py @@ -21,7 +21,7 @@ def my_function(x): # Notice that "while 1" also has this problem. Even though the compiler # knows there's no computation at the top of the loop, it's still expressed - # in byte code as a branch with two possibilities. + # in bytecode as a branch with two possibilities. i = 0 while 1: diff --git a/lab/disgen.py b/lab/disgen.py index 4e4c6fa6..26bc56bc 100644 --- a/lab/disgen.py +++ b/lab/disgen.py @@ -1,4 +1,4 @@ -"""Disassembler of Python byte code into mnemonics.""" +"""Disassembler of Python bytecode into mnemonics.""" # Adapted from stdlib dis.py, but returns structured information # instead of printing to stdout. @@ -133,7 +133,7 @@ def byte_from_code(code, i): return byte def findlabels(code): - """Detect all offsets in a byte code which are jump targets. + """Detect all offsets in a bytecode which are jump targets. Return the list of offsets. @@ -158,7 +158,7 @@ def findlabels(code): return labels def findlinestarts(code): - """Find the offsets in a byte code which are start of lines in the source. + """Find the offsets in a bytecode which are start of lines in the source. Generate pairs (offset, lineno) as described in Python/compile.c. diff --git a/tests/test_arcs.py b/tests/test_arcs.py index bb811c01..bcc6c024 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -942,9 +942,11 @@ class MiscArcTest(CoverageTest): def test_pathologically_long_code_object(self): # https://bitbucket.org/ned/coveragepy/issue/359 - # The structure of this file is such that an EXTENDED_ARG byte code is + # The structure of this file is such that an EXTENDED_ARG bytecode is # needed to encode the jump at the end. We weren't interpreting those # opcodes. + # Note that we no longer interpret bytecode at all, but it couldn't + # hurt to keep the test... code = """\ data = [ """ + "".join("""\ |