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

Method test_importmodulelevelobject

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

Source from the content-addressed store, hash-verified

209 # CRASHES importmodulelevel(NULL, NULL, NULL, NULL, 0)
210
211 def test_importmodulelevelobject(self):
212 # Test PyImport_ImportModuleLevelObject()
213 importmodulelevel = _testlimitedcapi.PyImport_ImportModuleLevelObject
214 self.check_importmodulelevel(importmodulelevel)
215
216 self.assertRaises(TypeError, importmodulelevel, b'os', NULL, NULL, NULL, 0)
217 self.assertRaises(ValueError, importmodulelevel, NULL, NULL, NULL, NULL, 0)
218
219 def check_executecodemodule(self, execute_code, *args):
220 name = 'test_import_executecode'

Callers

nothing calls this directly

Calls 2

assertRaisesMethod · 0.45

Tested by

no test coverage detected