MCPcopy Create free account
hub / github.com/NVIDIA/SkillEvaluator / _load_script

Function _load_script

tests/test_reference_skill_scripts.py:56–66  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

54
55
56def _load_script(name: str) -> ModuleType:
57 spec = importlib.util.spec_from_file_location(f"reference_script_{name}", SCRIPTS[name])
58 assert spec and spec.loader
59 module = importlib.util.module_from_spec(spec)
60 scripts_dir = str(SCRIPTS[name].parent)
61 sys.path.insert(0, scripts_dir)
62 try:
63 spec.loader.exec_module(module)
64 finally:
65 sys.path.remove(scripts_dir)
66 return module
67
68
69def test_task_content_containing_error_label_remains_successful(tmp_path: Path) -> None:

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected