JumpForge-Agentic-SE-3K / tests /test_release.py
jumplander's picture
Upload 34 files
b227dc8 verified
Raw
History Blame Contribute Delete
1.1 kB
import json
from collections import defaultdict
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
def load():
with (ROOT / "data" / "all.jsonl").open(encoding="utf-8") as f:
return [json.loads(line) for line in f]
def test_record_count():
assert len(load()) == 3000
def test_unique_ids_and_fingerprints():
rows = load()
assert len({r["id"] for r in rows}) == 3000
assert len({r["quality"]["structural_fingerprint"] for r in rows}) == 3000
def test_split_sizes():
rows = load()
counts = {s: sum(r["split"] == s for r in rows) for s in ("train", "validation", "test")}
assert counts == {"train": 2400, "validation": 300, "test": 300}
def test_no_archetype_split_leakage():
rows = load()
seen = defaultdict(set)
for row in rows:
seen[row["task"]["archetype"]].add(row["split"])
assert all(len(splits) == 1 for splits in seen.values())
def test_behavior_is_primary_axis():
rows = load()
assert len({r["task"]["family"] for r in rows}) == 12
assert len({r["task"]["archetype"] for r in rows}) == 120