Helper to run cgc cli.
(self, args, cwd=None, db_path=None, env=None)
| 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 |
no test coverage detected