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

Method check_import_func

Lib/test/test_capi/test_import.py:114–118  ·  view source on GitHub ↗
(self, import_module)

Source from the content-addressed store, hash-verified

112 # CRASHES addmoduleref(NULL)
113
114 def check_import_func(self, import_module):
115 self.check_import_loaded_module(import_module)
116 self.check_import_fresh_module(import_module)
117 self.assertRaises(ModuleNotFoundError, import_module, 'nonexistent')
118 self.assertRaises(ValueError, import_module, '')
119
120 def test_import(self):
121 # Test PyImport_Import()

Callers 5

test_importMethod · 0.95
test_importmoduleMethod · 0.95
test_importmoduleexMethod · 0.95

Calls 3

assertRaisesMethod · 0.45

Tested by

no test coverage detected