diff --git a/pyproject.toml b/pyproject.toml index 1465c641..3642f1eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,7 @@ dependencies = [ pytest = [ "pytest>=8.4.2", "pytest-asyncio>=1.2.0", + "pre-commit", ] api = [ diff --git a/tests/test_workspace_isolation.py b/tests/test_workspace_isolation.py index 4a6f284b..f962a300 100644 --- a/tests/test_workspace_isolation.py +++ b/tests/test_workspace_isolation.py @@ -824,6 +824,7 @@ async def test_lightrag_end_to_end_workspace_isolation(): # Factory function to create different mock LLM functions for each workspace def create_mock_llm_func(workspace_name): """Create a mock LLM function that returns different content based on workspace""" + async def mock_llm_func( prompt, system_prompt=None, history_messages=[], **kwargs ) -> str: @@ -840,6 +841,7 @@ relation<|#|>Machine Learning<|#|>Artificial Intelligence<|#|>subset, related fi entity<|#|>Neural Networks<|#|>concept<|#|>Neural Networks are computing systems inspired by biological neural networks. relation<|#|>Deep Learning<|#|>Neural Networks<|#|>uses, composed of<|#|>Deep Learning uses multiple layers of Neural Networks to learn representations. <|COMPLETE|>""" + return mock_llm_func # Mock embedding function diff --git a/uv.lock b/uv.lock index 5b86567e..97703af0 100644 --- a/uv.lock +++ b/uv.lock @@ -2611,6 +2611,7 @@ docling = [ evaluation = [ { name = "datasets" }, { name = "httpx" }, + { name = "pre-commit" }, { name = "pytest" }, { name = "pytest-asyncio" }, { name = "ragas" }, @@ -2696,6 +2697,7 @@ offline-storage = [ { name = "redis" }, ] pytest = [ + { name = "pre-commit" }, { name = "pytest" }, { name = "pytest-asyncio" }, ] @@ -2751,6 +2753,7 @@ requires-dist = [ { name = "passlib", extras = ["bcrypt"], marker = "extra == 'api'" }, { name = "pipmaster" }, { name = "pipmaster", marker = "extra == 'api'" }, + { name = "pre-commit", marker = "extra == 'pytest'" }, { name = "psutil", marker = "extra == 'api'" }, { name = "pycryptodome", marker = "extra == 'api'", specifier = ">=3.0.0,<4.0.0" }, { name = "pydantic" },