MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/optillm / test_plugin_module_imports

Function test_plugin_module_imports

tests/test_plugins.py:21–48  ·  view source on GitHub ↗

Test that plugin modules can be imported

()

Source from the content-addressed store, hash-verified

19
20
21def test_plugin_module_imports():
22 """Test that plugin modules can be imported"""
23 plugin_modules = [
24 'optillm.plugins.memory_plugin',
25 'optillm.plugins.readurls_plugin',
26 'optillm.plugins.privacy_plugin',
27 'optillm.plugins.genselect_plugin',
28 'optillm.plugins.majority_voting_plugin',
29 'optillm.plugins.web_search_plugin',
30 'optillm.plugins.deep_research_plugin',
31 'optillm.plugins.deepthink_plugin',
32 'optillm.plugins.longcepo_plugin',
33 'optillm.plugins.spl_plugin',
34 'optillm.plugins.proxy_plugin',
35 'optillm.plugins.mcp_plugin',
36 'optillm.plugins.compact_plugin'
37 ]
38
39 for module_name in plugin_modules:
40 try:
41 module = importlib.import_module(module_name)
42 assert hasattr(module, 'run'), f"{module_name} missing 'run' function"
43 assert hasattr(module, 'SLUG'), f"{module_name} missing 'SLUG' attribute"
44 except ImportError as e:
45 if pytest:
46 pytest.fail(f"Failed to import {module_name}: {e}")
47 else:
48 raise AssertionError(f"Failed to import {module_name}: {e}")
49
50
51def test_plugin_approach_detection():

Callers 1

test_plugins.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected