Read the records at their configured paths in the review header, replay, chunk-pr, score-outcomes, reading-cost and metric-bench
This commit is contained in:
@@ -15,6 +15,7 @@ from review_rules.comprehension_history import entries, Place
|
||||
from failure import Failure
|
||||
from test_env import isolated_env
|
||||
from metric_bench.main import scored_runs
|
||||
from project_config.test_project_config import write_config
|
||||
|
||||
TOOL = pathlib.Path(__file__).resolve().parents[1] / "metric-bench"
|
||||
|
||||
@@ -211,7 +212,9 @@ class BlackBox(unittest.TestCase):
|
||||
return top
|
||||
|
||||
def run_tool(self, top: str, *args: str) -> subprocess.CompletedProcess:
|
||||
return subprocess.run([sys.executable, str(TOOL), *args], cwd=top, capture_output=True, text=True, env=isolated_env())
|
||||
home = pathlib.Path(self.enterContext(tempfile.TemporaryDirectory()))
|
||||
write_config(home, pathlib.Path(top))
|
||||
return subprocess.run([sys.executable, str(TOOL), *args], cwd=top, capture_output=True, text=True, env={**isolated_env(), "HOME": str(home)})
|
||||
|
||||
def test_prints_each_metrics_score_on_each_run_and_the_medians(self):
|
||||
top = self.project("# Comprehension history\n\n## 2026-10-08T12:50:49Z, PR #1 at COMMIT\n\nJunior A, hardest first:\n\n- `a.py:1` `hard`\n")
|
||||
|
||||
Reference in New Issue
Block a user