From c34f6df61a2db40b8fe6544d4ce52758f067a575 Mon Sep 17 00:00:00 2001 From: hajdul88 <52442977+hajdul88@users.noreply.github.com> Date: Thu, 11 Dec 2025 20:47:58 +0100 Subject: [PATCH] Revert "Update test_search_db.py" This reverts commit 043a2da1aaac9b48b9c141ebe96603531aebb03d. --- cognee/tests/test_search_db.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/cognee/tests/test_search_db.py b/cognee/tests/test_search_db.py index ba28e9a93..d157a58a9 100644 --- a/cognee/tests/test_search_db.py +++ b/cognee/tests/test_search_db.py @@ -1,11 +1,8 @@ import pathlib import os -import warnings import pytest import pytest_asyncio import cognee - - from cognee.infrastructure.databases.graph import get_graph_engine from cognee.infrastructure.databases.vector import get_vector_engine from cognee.modules.graph.cognee_graph.CogneeGraphElements import Edge @@ -49,27 +46,6 @@ async def cleanup_litellm_clients(): pass -@pytest_asyncio.fixture(scope="session", autouse=True) -async def cleanup_litellm_clients_session(): - """Session-scoped fixture to cleanup LiteLLM clients at the end of all tests. - - This ensures cleanup happens before LiteLLM's own cleanup tries to run - during event loop closure, preventing RuntimeWarning in Python 3.10. - """ - yield - # Final cleanup of LiteLLM async clients at session end - try: - import litellm - - if hasattr(litellm, "close_litellm_async_clients"): - cleanup_coro = litellm.close_litellm_async_clients() - if cleanup_coro is not None: - await cleanup_coro - except (RuntimeError, Exception): - # Event loop might already be closing, ignore the error - pass - - async def setup_test_environment(): """Helper function to set up test environment with data, cognify, and triplet embeddings.""" # This test runs for multiple db settings, to run this locally set the corresponding db envs