MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / load_module

Function load_module

tests/unit/test_issue_duplicate_scripts.py:17–25  ·  view source on GitHub ↗
(script_name: str)

Source from the content-addressed store, hash-verified

15
16
17def load_module(script_name: str):
18 path = ROOT / 'scripts' / script_name
19 module_name = f'test_{path.stem}_{next(MODULE_COUNTER)}'
20 spec = importlib.util.spec_from_file_location(module_name, path)
21 if spec is None or spec.loader is None:
22 raise AssertionError(f'Unable to load module from {path}')
23 module = importlib.util.module_from_spec(spec)
24 spec.loader.exec_module(module)
25 return module
26
27
28def make_agent_message(text: str) -> dict:

Calls

no outgoing calls

Tested by

no test coverage detected