Skip to content

Commit b847b7c

Browse files
cdeustclaude
andcommitted
test(ablation): the runner wiring test needs psycopg, like the runner (#560)
benchmarks/lib/ablation_runner.py imports db_snapshot, which imports psycopg; the SQLite-only CI job has no postgresql extra and failed at import. The PostgreSQL test jobs keep running it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
1 parent 5fee794 commit b847b7c

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎tests_py/benchmarks/test_ablation_runner_wiring.py‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
import sys
1717
from pathlib import Path
1818

19+
import pytest
20+
1921
_REPO_ROOT = Path(__file__).resolve().parents[2]
2022

2123

@@ -32,7 +34,16 @@ def test_ablation_runner_import_wires_the_seam_and_disables_the_mechanism():
3234
"""The exact path benchmarks/lib/ablation_runner.py exercises:
3335
import it (which imports benchmarks.lib._composition_root_wiring for
3436
its side effect), set CORTEX_ABLATE_<NAME>=1 via its own
35-
_set_ablation_env helper, and prove is_mechanism_disabled sees it."""
37+
_set_ablation_env helper, and prove is_mechanism_disabled sees it.
38+
39+
ablation_runner imports benchmarks/lib/db_snapshot.py, which needs
40+
psycopg: the runner only exists for PostgreSQL benchmark databases, so
41+
the SQLite-only CI job cannot import it. The PostgreSQL test jobs run
42+
this test."""
43+
pytest.importorskip(
44+
"psycopg",
45+
reason="benchmarks/lib/ablation_runner.py requires the postgresql extra",
46+
)
3647
script = """
3748
import benchmarks.lib.ablation_runner as runner
3849
from mcp_server.core.ablation import Mechanism, is_mechanism_disabled

0 commit comments

Comments
 (0)