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

Method test_addmodule

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

Source from the content-addressed store, hash-verified

96 # CRASHES addmoduleobject(NULL)
97
98 def test_addmodule(self):
99 # Test PyImport_AddModule()
100 addmodule = _testlimitedcapi.PyImport_AddModule
101 self.check_addmodule(addmodule)
102
103 self.assertRaises(UnicodeDecodeError, addmodule, b'\xff')
104 # CRASHES addmodule(NULL)
105
106 def test_addmoduleref(self):
107 # Test PyImport_AddModuleRef()

Callers

nothing calls this directly

Calls 2

check_addmoduleMethod · 0.95
assertRaisesMethod · 0.45

Tested by

no test coverage detected