omniff / tests /python /unit /test_document_reader.py
stukenov's picture
Initial upload: OmniFF — FFmpeg for AI
88e3f4a verified
import pytest
from omniff.models.document_reader import DocumentReaderModel
def test_document_reader_interface():
model = DocumentReaderModel(llm_model_id="Qwen/Qwen3-4B", device="cpu")
assert not model.is_loaded
def test_document_reader_infer_not_loaded():
model = DocumentReaderModel(llm_model_id="Qwen/Qwen3-4B", device="cpu")
with pytest.raises(RuntimeError, match="not loaded"):
model.infer({"document_path": "test.pdf"})