Add test for chunker.chunk(None) to cover guard clause

This commit is contained in:
Chris McDonough 2026-06-22 13:58:37 -04:00
parent 8fe8b6d291
commit 256fd66b46

View file

@ -55,6 +55,13 @@ async def test_local_chunker(qa_corpus: list[dict[str, str]]):
assert abs(total_tokens - original_tokens) <= original_tokens * 0.1
@pytest.mark.asyncio
async def test_local_chunker_none_document():
"""Test DoclingLocalChunker returns empty list for None document."""
chunker = DoclingLocalChunker()
assert await chunker.chunk(None) == []
@pytest.mark.asyncio
async def test_local_chunker_custom_config():
"""Test DoclingLocalChunker with custom configuration."""