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

Method test_reload_missing_loader

Lib/test/test_importlib/test_api.py:204–213  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

202 self.assertEqual(reloaded.spam, 3)
203
204 def test_reload_missing_loader(self):
205 with import_helper.CleanImport('types'):
206 import types
207 loader = types.__loader__
208 del types.__loader__
209 reloaded = self.init.reload(types)
210
211 self.assertIs(reloaded, types)
212 self.assertIs(sys.modules['types'], types)
213 self.assertEqual(reloaded.__loader__.path, loader.path)
214
215 def test_reload_loader_replaced(self):
216 with import_helper.CleanImport('types'):

Callers

nothing calls this directly

Calls 3

reloadMethod · 0.45
assertIsMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected