MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / run_cgc

Method run_cgc

tests/e2e/test_user_journeys.py:22–31  ·  view source on GitHub ↗

Helper to run cgc cli.

(self, args, cwd=None, db_path=None, env=None)

Source from the content-addressed store, hash-verified

20 """
21
22 def run_cgc(self, args, cwd=None, db_path=None, env=None):
23 """Helper to run cgc cli."""
24 cmd = [sys.executable, "-m", "codegraphcontext.cli.main"]
25 if db_path:
26 cmd += ["--path", str(db_path)]
27 cmd += args
28 run_env = os.environ.copy()
29 if env:
30 run_env.update(env)
31 return subprocess.run(cmd, capture_output=True, text=True, cwd=cwd, env=run_env)
32
33 @pytest.mark.skipif(not KUZU_AVAILABLE, reason="KuzuDB not installed")
34 @pytest.mark.slow

Callers 2

test_clean_upMethod · 0.95

Calls 3

updateMethod · 0.65
copyMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected