test: verify real kbqa workflow
This commit is contained in:
@@ -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")
|
||||
Reference in New Issue
Block a user