test: verify real kbqa workflow

This commit is contained in:
gqt
2026-07-13 14:23:06 +08:00
parent 52184aa00e
commit 2361d62867
32 changed files with 656 additions and 12 deletions
@@ -0,0 +1,13 @@
from pathlib import Path
import pytest
from kbqa.api.errors import AppError
from kbqa.indexing.loaders import load_document
def test_text_loader_rejects_non_utf8(tmp_path: Path) -> None:
path = tmp_path / "bad.txt"
path.write_bytes(b"\xff\xfe")
with pytest.raises(AppError, match="UTF-8"):
load_document(path, "txt")