MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / test_codebuddy_installation_roundtrip

Function test_codebuddy_installation_roundtrip

tests/test_codebuddy.py:322–341  ·  view source on GitHub ↗

Install then uninstall leaves no trace of graphify CODEBUDDY.md or hook.

(tmp_path)

Source from the content-addressed store, hash-verified

320
321
322def test_codebuddy_installation_roundtrip(tmp_path):
323 """Install then uninstall leaves no trace of graphify CODEBUDDY.md or hook."""
324 from graphify.__main__ import codebuddy_install, codebuddy_uninstall
325 # Pre-existing project file
326 _codebuddy_md_path(tmp_path).write_text("# My project\n")
327 # One section above graphify to test cleanup
328 codebuddy_install(tmp_path)
329 codebuddy_uninstall(tmp_path)
330 # CODEBUDDY.md should exist with original content only
331 md = _codebuddy_md_path(tmp_path)
332 assert md.exists()
333 content = md.read_text()
334 assert "## graphify" not in content
335 assert "# My project" in content
336 # Hook should be removed
337 settings_path = _settings_path(tmp_path)
338 if settings_path.exists():
339 settings = json.loads(settings_path.read_text())
340 hooks = settings.get("hooks", {}).get("PreToolUse", [])
341 assert not any("graphify" in str(h) for h in hooks)

Callers

nothing calls this directly

Calls 5

_codebuddy_md_pathFunction · 0.85
codebuddy_installFunction · 0.85
codebuddy_uninstallFunction · 0.85
_settings_pathFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected