Lines Matching refs:lineno
109 # info about where the docstring came from (name, filename, lineno).
422 - lineno: The line number within the DocTest string containing
436 def __init__(self, source, want, exc_msg=None, lineno=0, indent=0,
448 self.lineno = lineno
460 self.lineno == other.lineno and \
469 return hash((self.source, self.want, self.lineno, self.indent,
489 - lineno: The line number within filename where this DocTest
497 def __init__(self, examples, globs, name, filename, lineno, docstring):
509 self.lineno = lineno
519 (self.name, self.filename, self.lineno, examples))
530 self.lineno == other.lineno
536 return hash((self.docstring, self.name, self.filename, self.lineno))
542 return cmp((self.name, self.filename, self.lineno, id(self)),
543 (other.name, other.filename, other.lineno, id(other)))
612 charno, lineno = 0, 0
617 # Update lineno (lines before this example)
618 lineno += string.count('\n', charno, m.start())
621 self._parse_example(m, name, lineno)
625 lineno=lineno,
628 # Update lineno (lines inside this example)
629 lineno += string.count('\n', m.start(), m.end())
636 def get_doctest(self, string, globs, name, filename, lineno):
641 `globs`, `name`, `filename`, and `lineno` are attributes for
646 name, filename, lineno, string)
662 def _parse_example(self, m, name, lineno):
670 `name` is the string's name, and `lineno` is the line number
679 self._check_prompt_blank(source_lines, indent, name, lineno)
680 self._check_prefix(source_lines[1:], ' '*indent + '.', name, lineno)
691 lineno + len(source_lines))
702 options = self._find_options(source, name, lineno)
716 def _find_options(self, source, name, lineno):
721 `name` is the string's name, and `lineno` is the line number
733 (lineno+1, name, option))
739 (lineno, name, source))
754 def _check_prompt_blank(self, lines, indent, name, lineno):
765 (lineno+i+1, name,
768 def _check_prefix(self, lines, prefix, name, lineno):
777 (lineno+i+1, name, line))
1012 lineno = self._find_lineno(obj, source_lines)
1026 filename, lineno)
1033 lineno = None
1037 lineno = 0
1049 lineno = i
1058 lineno = getattr(obj, 'co_firstlineno', None)-1
1065 if lineno is not None:
1067 return lineno+1
1069 for lineno in range(lineno, len(source_lines)):
1070 if pat.match(source_lines[lineno]):
1071 return lineno
1214 if test.lineno is not None and example.lineno is not None:
1215 lineno = test.lineno + example.lineno + 1
1217 lineno = '?'
1219 (test.filename, lineno, test.name))
1221 out.append('Line %s, in %s' % (example.lineno+1, test.name))
2205 if test.lineno is None:
2206 lineno = 'unknown line number'
2208 lineno = '%s' % test.lineno
2212 % (test.name, test.filename, lineno, lname, err)