diff --git a/tests/test_dimension_mismatch.py b/tests/test_dimension_mismatch.py index 3361b621..2dd6dc1d 100644 --- a/tests/test_dimension_mismatch.py +++ b/tests/test_dimension_mismatch.py @@ -7,7 +7,7 @@ legacy collections/tables to new ones with different embedding models. """ import pytest -from unittest.mock import MagicMock, AsyncMock, patch +from unittest.mock import MagicMock, AsyncMock from lightrag.kg.qdrant_impl import QdrantVectorDBStorage from lightrag.kg.postgres_impl import PGVectorStorage diff --git a/tests/test_e2e_multi_instance.py b/tests/test_e2e_multi_instance.py index f7341777..071b0b08 100644 --- a/tests/test_e2e_multi_instance.py +++ b/tests/test_e2e_multi_instance.py @@ -1153,7 +1153,7 @@ async def test_dimension_mismatch_postgres( }, ) - print(f"✅ Legacy table created with 3 records (1536d)") + print("✅ Legacy table created with 3 records (1536d)") # Step 2: Try to initialize LightRAG with NEW model (3072d) async def embed_func_new(texts): @@ -1271,7 +1271,7 @@ async def test_dimension_mismatch_qdrant( # Delete if exists try: client.delete_collection(legacy_collection) - except: + except Exception: pass # Create legacy collection with 768d @@ -1294,7 +1294,7 @@ async def test_dimension_mismatch_qdrant( ) client.upsert(collection_name=legacy_collection, points=points, wait=True) - print(f"✅ Legacy collection created with 3 records (768d)") + print("✅ Legacy collection created with 3 records (768d)") # Step 2: Try to initialize LightRAG with NEW model (1024d) async def embed_func_new(texts): @@ -1384,7 +1384,7 @@ async def test_dimension_mismatch_qdrant( for coll in client.get_collections().collections: if "lightrag" in coll.name.lower(): client.delete_collection(coll.name) - except: + except Exception: pass