refactor(knowledge-base mcp server): adjust formatting for consistency and readability
Improved code formatting, line breaks, and indentation across chunking logic and multiple test modules to enhance code clarity and maintain consistent style. No functional changes made.
This commit is contained in:
@@ -67,10 +67,14 @@ class TestCollectionManager:
|
||||
assert result.embeddings_generated == 0
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_ingest_error_handling(self, collection_manager, sample_ingest_request):
|
||||
async def test_ingest_error_handling(
|
||||
self, collection_manager, sample_ingest_request
|
||||
):
|
||||
"""Test ingest error handling."""
|
||||
# Make embedding generation fail
|
||||
collection_manager._embeddings.generate_batch.side_effect = Exception("Embedding error")
|
||||
collection_manager._embeddings.generate_batch.side_effect = Exception(
|
||||
"Embedding error"
|
||||
)
|
||||
|
||||
result = await collection_manager.ingest(sample_ingest_request)
|
||||
|
||||
@@ -182,7 +186,9 @@ class TestCollectionManager:
|
||||
)
|
||||
collection_manager._database.get_collection_stats.return_value = expected_stats
|
||||
|
||||
stats = await collection_manager.get_collection_stats("proj-123", "test-collection")
|
||||
stats = await collection_manager.get_collection_stats(
|
||||
"proj-123", "test-collection"
|
||||
)
|
||||
|
||||
assert stats.chunk_count == 100
|
||||
assert stats.unique_sources == 10
|
||||
|
||||
Reference in New Issue
Block a user