fix(avocet): tighten body truncation test to exact 400-char assertion

This commit is contained in:
pyr0ball 2026-03-15 15:44:19 -07:00
parent 5eb593569d
commit f262b23cf5

View file

@ -42,7 +42,8 @@ def test_load_and_prepare_data_formats_input_as_sep(tmp_path):
texts, labels = load_and_prepare_data(score_file) texts, labels = load_and_prepare_data(score_file)
assert texts[0].startswith("Hello [SEP] ") assert texts[0].startswith("Hello [SEP] ")
assert len(texts[0]) <= len("Hello [SEP] ") + 400 + 5 parts = texts[0].split(" [SEP] ", 1)
assert len(parts[1]) == 400, f"Body must be exactly 400 chars, got {len(parts[1])}"
def test_load_and_prepare_data_raises_on_missing_file(): def test_load_and_prepare_data_raises_on_missing_file():