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

Method assertInspectEqual

Lib/test/test_inspect/test_inspect.py:6559–6565  ·  view source on GitHub ↗
(self, path, source)

Source from the content-addressed store, hash-verified

6557 """)
6558
6559 def assertInspectEqual(self, path, source):
6560 inspected_src = inspect.getsource(source)
6561 with open(path, encoding='utf-8') as src:
6562 self.assertEqual(
6563 src.read().splitlines(True),
6564 inspected_src.splitlines(True)
6565 )
6566
6567 def test_getsource_reload(self):
6568 # see issue 1218234

Callers 1

test_getsource_reloadMethod · 0.95

Calls 4

openFunction · 0.50
assertEqualMethod · 0.45
splitlinesMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected