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

Method test_getsource_reload

Lib/test/test_inspect/test_inspect.py:6567–6574  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6565 )
6566
6567 def test_getsource_reload(self):
6568 # see issue 1218234
6569 with ready_to_import('reload_bug', self.src_before) as (name, path):
6570 module = importlib.import_module(name)
6571 self.assertInspectEqual(path, module)
6572 with open(path, 'w', encoding='utf-8') as src:
6573 src.write(self.src_after)
6574 self.assertInspectEqual(path, module)
6575
6576
6577class TestRepl(unittest.TestCase):

Callers

nothing calls this directly

Calls 5

assertInspectEqualMethod · 0.95
ready_to_importFunction · 0.90
openFunction · 0.50
import_moduleMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected