Add test for chunker.chunk(None) to cover guard clause
This commit is contained in:
parent
8fe8b6d291
commit
256fd66b46
1 changed files with 7 additions and 0 deletions
|
|
@ -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."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue