Home | History | Annotate | Download | only in contrib

Lines Matching refs:statements

43     option, show line numbers of the statements that weren't executed.
46 Make annotated copies of the given files, marking statements that
47 are executed with > and statements that are missed with !. With
102 statements.
104 def __init__(self, statements, excluded, suite_spots):
106 self.statements = statements
152 # Pass statements have weird interactions with docstrings. If this
158 self.statements[lines[1]] = 1
161 # Discard nodes are statements that execute an expression, but then
197 self.statements[lineno] = 1
270 # "global" statements don't execute like others (they don't call the
577 # source code for the module, (2) a list of lines of statements
578 # in the source code, (3) a list of lines of excluded statements,
580 # statements that cross lines.
680 # "pass" statements are tricky: different versions of Python
703 # Parse the code and analyze the parse tree to find out which statements
711 # statements. We add newlines to be impervious to final partial lines.
712 statements = {}
714 visitor = StatementFindingAstVisitor(statements, excluded, suite_spots)
717 lines = statements.keys()
723 # format_lines(statements, lines). Format a list of line numbers
725 # represent consecutive statements. This will coalesce even if
726 # there are gaps between statements, so if statements =
730 def format_lines(self, statements, lines):
736 while i < len(statements) and j < len(lines):
737 if statements[i] == lines[j]:
763 filename, statements, excluded, line_map = self.analyze_morf(morf)
768 for line in statements:
775 return (filename, statements, excluded, missing,
776 self.format_lines(statements, missing))
840 _, statements, _, missing, readable = self.analysis2(morf)
841 n = len(statements)
879 filename, statements, excluded, missing, _ = self.analysis2(morf)
880 self.annotate_file(filename, statements, excluded, missing, directory)
887 def annotate_file(self, filename, statements, excluded, missing, directory=None):
905 while i < len(statements) and statements[i] < lineno:
909 if i < len(statements) and statements[i] == lineno:
916 if i >= len(statements) and j >= len(missing):
918 elif i >= len(statements) or j >= len(missing):
920 elif statements[i] == missing[j]:
1031 # - Finding executable statements has been rewritten so that docstrings and
1081 # multi-line statements is now less sensitive to the exact line that Python
1082 # reports during execution. Pass statements are handled specially so that their