Add pre-commit to pytest dependencies and format test code
• Add pre-commit to pytest extra deps • Update lock file dependencies
This commit is contained in:
parent
99262adaaa
commit
5da82bb096
3 changed files with 6 additions and 0 deletions
|
|
@ -46,6 +46,7 @@ dependencies = [
|
|||
pytest = [
|
||||
"pytest>=8.4.2",
|
||||
"pytest-asyncio>=1.2.0",
|
||||
"pre-commit",
|
||||
]
|
||||
|
||||
api = [
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
3
uv.lock
generated
3
uv.lock
generated
|
|
@ -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" },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue