17 lines
535 B
Python
17 lines
535 B
Python
"""Structural validation for the seed Golden Dataset."""
|
|
|
|
import json
|
|
from pathlib import Path
|
|
|
|
|
|
def test_seed_golden_dataset_has_required_fields() -> None:
|
|
dataset_path = Path("fixtures/evaluation/golden.jsonl")
|
|
records = [json.loads(line) for line in dataset_path.read_text().splitlines() if line]
|
|
|
|
assert records
|
|
for record in records:
|
|
assert isinstance(record["id"], str)
|
|
assert isinstance(record["query"], str)
|
|
assert record["expected_documents"]
|
|
assert record["expected_sections"]
|