From e1ff8b27fad4859201fa1a2d02bb5292e5bf01fa Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 20 Aug 2026 18:23:26 +0000 Subject: [PATCH] test: satisfy test-quality gate in consolidated registry tests Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../llm_cost_calc/test_llm_cost_calc_utils.py | 12 +++++++++--- .../test_gemini_3_1_flash_lite_image_pricing.py | 3 --- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py b/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py index 1cecd3e5f7c..137dc1d8f66 100644 --- a/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py +++ b/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py @@ -1065,10 +1065,16 @@ def test_generic_cost_per_token_gpt56_terra_cache_costs_by_tier_and_context( ], ) def test_generic_cost_per_token_gpt56_cyber( - model, prompt_tokens, input_rate, cache_write_rate, cache_read_rate, output_rate + model, + prompt_tokens, + input_rate, + cache_write_rate, + cache_read_rate, + output_rate, + monkeypatch, ): - os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True" - litellm.model_cost = litellm.get_model_cost_map(url="") + monkeypatch.setenv("LITELLM_LOCAL_MODEL_COST_MAP", "True") + monkeypatch.setattr(litellm, "model_cost", litellm.get_model_cost_map(url="")) cached_tokens = 50000 cache_write_tokens = 40000 diff --git a/tests/test_litellm/test_gemini_3_1_flash_lite_image_pricing.py b/tests/test_litellm/test_gemini_3_1_flash_lite_image_pricing.py index adc306971e3..67d6b9e76cf 100644 --- a/tests/test_litellm/test_gemini_3_1_flash_lite_image_pricing.py +++ b/tests/test_litellm/test_gemini_3_1_flash_lite_image_pricing.py @@ -12,9 +12,6 @@ values in both the primary price map and the ``litellm/`` backup, and verify import json import os -import sys - -sys.path.insert(0, os.path.abspath("../..")) import litellm from litellm import completion_cost