Something went wrong. Try again.
Parametric learning in your code harness.
Something went wrong. Try again.
1.3 kB · 45 lines
Python
at letta-code
12345678910111213141516171819202122232425262728293031323334353637383940414243444546from __future__ import annotations
import sysimport unittestfrom pathlib import Path
ROOT = Path(__file__).resolve().parents[1]sys.path.insert(0, str(ROOT))
from report import summarize # noqa: E402
class ReportTest(unittest.TestCase): def test_keeps_strategy_arms_separate(self) -> None: rows = [ { "problem_id": 1, "language": "python", "phase": "exploration", "strategy": "derive", "correct": True, "successful_execution": True, "format_valid": True, "duration_seconds": 1, "error": "", }, { "problem_id": 1, "language": "python", "phase": "exploration", "strategy": "tests_first", "correct": False, "successful_execution": True, "format_valid": False, "duration_seconds": 2, "error": "", }, ] summary = summarize(rows) self.assertEqual(len(summary["breakdown"]), 2) self.assertEqual({row["strategy"] for row in summary["breakdown"]}, {"derive", "tests_first"})
if __name__ == "__main__": unittest.main()