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

Method test_importmodule

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

Source from the content-addressed store, hash-verified

126 self.assertRaises(SystemError, import_, NULL)
127
128 def test_importmodule(self):
129 # Test PyImport_ImportModule()
130 importmodule = _testlimitedcapi.PyImport_ImportModule
131 self.check_import_func(importmodule)
132
133 self.assertRaises(UnicodeDecodeError, importmodule, b'\xff')
134 # CRASHES importmodule(NULL)
135
136 def test_importmodulenoblock(self):
137 # Test deprecated (stable ABI only) PyImport_ImportModuleNoBlock()

Callers

nothing calls this directly

Calls 2

check_import_funcMethod · 0.95
assertRaisesMethod · 0.45

Tested by

no test coverage detected