Files
buddha-gpt/tests/test_collect.py

19 lines
484 B
Python

from buddhagpt.collect import load_bench
def test_bench_loads_and_validates(tmp_path):
f = tmp_path / "b.yaml"
f.write_text("- id: x-01\n category: distress\n prompt: hello\n")
items = load_bench(f)
assert items[0]["id"] == "x-01"
def test_bench_rejects_bad_category(tmp_path):
f = tmp_path / "b.yaml"
f.write_text("- id: x-01\n category: nope\n prompt: hello\n")
try:
load_bench(f)
assert False
except ValueError:
pass