mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
Merge branch 'litellm_october_alexsander_stanging' of https://github.com/BerriAI/litellm into litellm_october_alexsander_stanging
This commit is contained in:
commit
bdca4db941
1 changed files with 8 additions and 8 deletions
|
|
@ -2,6 +2,7 @@ import sys
|
|||
import os
|
||||
import pytest
|
||||
import ast
|
||||
import ast
|
||||
|
||||
sys.path.insert(
|
||||
0, os.path.abspath("../..")
|
||||
|
|
@ -179,14 +180,6 @@ class TestRouterIndexManagement:
|
|||
assert "claude-3" in router.model_name_to_deployment_indices
|
||||
assert router.model_name_to_deployment_indices["claude-3"] == [0]
|
||||
|
||||
def test_model_names_is_set(self):
|
||||
"""Verify that model_names uses a set for O(1) lookups, not a list (O(n))"""
|
||||
router = Router(model_list=[])
|
||||
|
||||
assert isinstance(router.model_names, set), (
|
||||
f"model_names should be a set for O(1) lookups, but got {type(router.model_names)}"
|
||||
)
|
||||
|
||||
def test_no_linear_scans_in_router(self):
|
||||
"""
|
||||
Static analysis test to ensure Router doesn't use O(n) linear scans.
|
||||
|
|
@ -273,3 +266,10 @@ class TestRouterIndexManagement:
|
|||
f"ALLOWED_METHODS in this test method.\n"
|
||||
f"{'='*70}\n"
|
||||
)
|
||||
def test_model_names_is_set(self):
|
||||
"""Verify that model_names uses a set for O(1) lookups, not a list (O(n))"""
|
||||
router = Router(model_list=[])
|
||||
|
||||
assert isinstance(router.model_names, set), (
|
||||
f"model_names should be a set for O(1) lookups, but got {type(router.model_names)}"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue