From f262b23cf5a61fe60264392169ec1633b2307eb7 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Sun, 15 Mar 2026 15:44:19 -0700 Subject: [PATCH] fix(avocet): tighten body truncation test to exact 400-char assertion --- tests/test_finetune.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_finetune.py b/tests/test_finetune.py index d0fc569..1c3e0bd 100644 --- a/tests/test_finetune.py +++ b/tests/test_finetune.py @@ -42,7 +42,8 @@ def test_load_and_prepare_data_formats_input_as_sep(tmp_path): texts, labels = load_and_prepare_data(score_file) 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():