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

Method test_import

Lib/test/test_capi/test_import.py:120–126  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

118 self.assertRaises(ValueError, import_module, '')
119
120 def test_import(self):
121 # Test PyImport_Import()
122 import_ = _testlimitedcapi.PyImport_Import
123 self.check_import_func(import_)
124
125 self.assertRaises(TypeError, import_, b'os')
126 self.assertRaises(SystemError, import_, NULL)
127
128 def test_importmodule(self):
129 # Test PyImport_ImportModule()

Callers

nothing calls this directly

Calls 2

check_import_funcMethod · 0.95
assertRaisesMethod · 0.45

Tested by

no test coverage detected