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

Method check_direct

Lib/test/test_import/__init__.py:2886–2889  ·  view source on GitHub ↗
(self, loaded)

Source from the content-addressed store, hash-verified

2884 self.assertIs(snap.cached, mod)
2885
2886 def check_direct(self, loaded):
2887 # The module has its own PyModuleDef, with a matching name.
2888 self.assertEqual(loaded.module.__name__, loaded.name)
2889 self.assertIs(loaded.snapshot.lookedup, loaded.module)
2890
2891 def check_indirect(self, loaded, orig):
2892 # The module re-uses another's PyModuleDef, with a different name.

Callers 1

test_variantsMethod · 0.95

Calls 2

assertEqualMethod · 0.45
assertIsMethod · 0.45

Tested by 1

test_variantsMethod · 0.76