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

Method test_importmodulelevel

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

Source from the content-addressed store, hash-verified

201 self.assertRaises(TypeError, importmodulelevel, 'test_import', [], NULL, NULL, 1)
202
203 def test_importmodulelevel(self):
204 # Test PyImport_ImportModuleLevel()
205 importmodulelevel = _testlimitedcapi.PyImport_ImportModuleLevel
206 self.check_importmodulelevel(importmodulelevel)
207
208 self.assertRaises(UnicodeDecodeError, importmodulelevel, b'\xff', NULL, NULL, NULL, 0)
209 # CRASHES importmodulelevel(NULL, NULL, NULL, NULL, 0)
210
211 def test_importmodulelevelobject(self):
212 # Test PyImport_ImportModuleLevelObject()

Callers

nothing calls this directly

Calls 2

assertRaisesMethod · 0.45

Tested by

no test coverage detected