MCPcopy Create free account
hub / github.com/alibaba/zvec / test_require_module_import_error

Function test_require_module_import_error

python/tests/test_util.py:37–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35
36
37def test_require_module_import_error():
38 with pytest.raises(ImportError) as exc_info:
39 require_module("nonexistent_module")
40
41 exception_msg = str(exc_info.value)
42 assert "Required package 'nonexistent_module' is not installed." in exception_msg
43
44
45def test_require_module_with_mitigation_import_error():

Callers

nothing calls this directly

Calls 1

require_moduleFunction · 0.90

Tested by

no test coverage detected