From b5dac08b0900f728a1e35f9a319afe3155884c6e Mon Sep 17 00:00:00 2001 From: Marcus Date: Fri, 4 Sep 2026 12:43:38 -0400 Subject: [PATCH] test(prompt-templates): drop the explanatory docstrings from the optional-keys regression test --- .../test_custom_prompt_optional_keys.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tests/test_litellm/litellm_core_utils/prompt_templates/test_custom_prompt_optional_keys.py b/tests/test_litellm/litellm_core_utils/prompt_templates/test_custom_prompt_optional_keys.py index 29f98be40f8..cead250c580 100644 --- a/tests/test_litellm/litellm_core_utils/prompt_templates/test_custom_prompt_optional_keys.py +++ b/tests/test_litellm/litellm_core_utils/prompt_templates/test_custom_prompt_optional_keys.py @@ -1,10 +1,3 @@ -"""Every consumer of ``custom_prompt_dict`` must treat the two prompt-value keys as optional. - -``litellm.completion()`` only stores ``initial_prompt_value`` / ``final_prompt_value`` when the -caller passes a truthy value, and ``custom_prompt()`` already defaults both to ``""``. A template -that sets ``roles`` alone therefore has to render, not raise ``KeyError``. -""" - import sys import types @@ -36,16 +29,12 @@ FULL_TEMPLATE = {"roles": ROLES, "initial_prompt_value": INITIAL, "final_prompt_ class _PromptCaptured(Exception): - """Raised by the test doubles below to stop a provider call once it has built its prompt.""" - def __init__(self, prompt): super().__init__(prompt) self.prompt = prompt class _CapturingLogging: - """Stands in for the logging object providers call with the prompt they are about to send.""" - def pre_call(self, input, api_key, additional_args=None, **kwargs): raise _PromptCaptured(input) @@ -61,8 +50,6 @@ def _captured_prompt(call): @pytest.fixture(autouse=True) def stub_vllm_import(monkeypatch): - """``vllm`` is an optional heavyweight dependency; its handler only needs the two names.""" - class _SamplingParams: def __init__(self, **kwargs): self.kwargs = kwargs