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

Method test_import

Lib/test/test_pickle.py:633–642  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

631
632class CompatPickleTests(unittest.TestCase):
633 def test_import(self):
634 modules = set(IMPORT_MAPPING.values())
635 modules |= set(REVERSE_IMPORT_MAPPING)
636 modules |= {module for module, name in REVERSE_NAME_MAPPING}
637 modules |= {module for module, name in NAME_MAPPING.values()}
638 for module in modules:
639 try:
640 getmodule(module)
641 except ImportError:
642 pass
643
644 def test_import_mapping(self):
645 for module3, module2 in REVERSE_IMPORT_MAPPING.items():

Callers

nothing calls this directly

Calls 3

setFunction · 0.85
getmoduleFunction · 0.70
valuesMethod · 0.45

Tested by

no test coverage detected