mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
chore: align auxiliary scripts and tests with uv
This commit is contained in:
parent
1ef1c5a6dd
commit
2ad24218d0
8 changed files with 15 additions and 7 deletions
|
|
@ -37,7 +37,7 @@ secret:
|
|||
- "docs/**"
|
||||
- "**/*.md"
|
||||
- "**/*.lock"
|
||||
- "poetry.lock"
|
||||
- "uv.lock"
|
||||
- "package-lock.json"
|
||||
|
||||
# Ignore security incidents with the SHA256 of the occurrence (false positives)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,12 @@
|
|||
#!/usr/bin/env python3
|
||||
# /// script
|
||||
# requires-python = ">=3.9"
|
||||
# dependencies = [
|
||||
# "httpx==0.28.1",
|
||||
# "pyyaml==6.0.2",
|
||||
# ]
|
||||
# ///
|
||||
|
||||
"""
|
||||
LiteLLM Health Check Client
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ async def test_health_and_chat_completion():
|
|||
assert response.status == 200
|
||||
readiness_response = await response.json()
|
||||
# Accept both "healthy" (new format) and "connected" (legacy format)
|
||||
# since this test runs against both source builds and pip-installed versions
|
||||
# since this test runs against both source builds and packaged installs
|
||||
assert readiness_response["status"] in ("healthy", "connected")
|
||||
|
||||
# Test liveness endpoint
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ They verify end-to-end that:
|
|||
3. A clean text message passes through and triggers a real OpenAI response.
|
||||
|
||||
Run with:
|
||||
poetry run pytest tests/llm_translation/realtime/test_realtime_guardrails_openai.py -v -s
|
||||
uv run pytest tests/llm_translation/realtime/test_realtime_guardrails_openai.py -v -s
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ def test_container_build_no_network_fetch():
|
|||
This verifies that all dependencies are properly bundled and no
|
||||
runtime network calls are made during container initialization.
|
||||
|
||||
Note: Build itself may need network for pip install, but runtime should not.
|
||||
Note: Build itself may need network to resolve dependencies, but runtime should not.
|
||||
"""
|
||||
# This is a simplified version - full test would need to:
|
||||
# 1. Build image with --network=none (requires pre-cached deps)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ except ImportError:
|
|||
@pytest.mark.asyncio
|
||||
@pytest.mark.skipif(
|
||||
not SEMANTIC_ROUTER_AVAILABLE,
|
||||
reason="semantic-router not installed. Install with: pip install 'litellm[semantic-router]'"
|
||||
reason="semantic-router not installed. Install the `litellm[semantic-router]` extra."
|
||||
)
|
||||
@pytest.mark.skipif(
|
||||
not os.environ.get("OPENAI_API_KEY"),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"""
|
||||
Unit tests for cache Prometheus metrics.
|
||||
|
||||
Run with: poetry run pytest tests/test_litellm/integrations/test_prometheus_cache_metrics.py -v
|
||||
Run with: uv run pytest tests/test_litellm/integrations/test_prometheus_cache_metrics.py -v
|
||||
"""
|
||||
import pytest
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ The fix implements:
|
|||
4. Fixed __getattr__ fallback that now waits for reconnection
|
||||
|
||||
Run these tests:
|
||||
poetry run pytest tests/test_litellm/proxy/db/test_rds_iam_token_expiry.py -v -s
|
||||
uv run pytest tests/test_litellm/proxy/db/test_rds_iam_token_expiry.py -v -s
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue