File size: 456 Bytes
88e3f4a
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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"})