MCPcopy Index your code
hub / github.com/RustPython/RustPython / __patched_linecache_getlines

Method __patched_linecache_getlines

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

Source from the content-addressed store, hash-verified

1499 r'(?P<name>.+)'
1500 r'\[(?P<examplenum>\d+)\]>$')
1501 def __patched_linecache_getlines(self, filename, module_globals=None):
1502 m = self.__LINECACHE_FILENAME_RE.match(filename)
1503 if m and m.group('name') == self.test.name:
1504 example = self.test.examples[int(m.group('examplenum'))]
1505 return example.source.splitlines(keepends=True)
1506 else:
1507 return self.save_linecache_getlines(filename, module_globals)
1508
1509 def run(self, test, compileflags=None, out=None, clear_globs=True):
1510 """

Callers

nothing calls this directly

Calls 3

matchMethod · 0.45
groupMethod · 0.45
splitlinesMethod · 0.45

Tested by

no test coverage detected