From 1f68b1ab8408bbc391cd2446af6d58ffc751fc6b Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 26 Aug 2026 22:29:02 +0000 Subject: [PATCH] test(routing_groups): tighten exception matching in routing group tests Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../router_strategy/test_router_routing_groups.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_litellm/router_strategy/test_router_routing_groups.py b/tests/test_litellm/router_strategy/test_router_routing_groups.py index 9ff60dc19b7..0006057b93d 100644 --- a/tests/test_litellm/router_strategy/test_router_routing_groups.py +++ b/tests/test_litellm/router_strategy/test_router_routing_groups.py @@ -787,7 +787,7 @@ def test_failed_routing_groups_update_keeps_previous_groups(): def test_overlap_error_names_every_conflicting_model(): - with pytest.raises(ValueError) as exc_info: + with pytest.raises(ValueError, match="appears in") as exc_info: _build_router( routing_groups=[ { @@ -834,7 +834,7 @@ def test_unbuildable_group_selector_keeps_previous_groups(): ) selector = router._group_selectors["g1"]["latency-based-routing"] - with pytest.raises(Exception): + with pytest.raises(ValidationError, match="ttl"): router.update_settings( routing_groups=[ {"group_name": "g1", "models": ["filtered-model"], "routing_strategy": "latency-based-routing"},