MCPcopy Index your code
hub / github.com/python/cpython / __patched_linecache_getlines

Method __patched_linecache_getlines

Lib/doctest.py:1528–1534  ·  view source on GitHub ↗
(self, filename, module_globals=None)

Source from the content-addressed store, hash-verified

1526 r'(?P<name>.+)'
1527 r'\[(?P<examplenum>\d+)\]>$')
1528 def __patched_linecache_getlines(self, filename, module_globals=None):
1529 m = self.__LINECACHE_FILENAME_RE.match(filename)
1530 if m and m.group('name') == self.test.name:
1531 example = self.test.examples[int(m.group('examplenum'))]
1532 return example.source.splitlines(keepends=True)
1533 else:
1534 return self.save_linecache_getlines(filename, module_globals)
1535
1536 def run(self, test, compileflags=None, out=None, clear_globs=True):
1537 """

Callers

nothing calls this directly

Calls 3

matchMethod · 0.45
groupMethod · 0.45
splitlinesMethod · 0.45

Tested by

no test coverage detected