CubeLoop — a Pythonic, async-native agent harness core designed for high performance, readability, and production-grade persistence.
Python agent-frameworkagent-harnessagent-runtimeagentic-aiai-agentsai-frameworkanthropicharnessharness-engineeringharness-frameworklanggraphlanggraph-alternativellmmcpopenaipi-agentpi-agent-corepythonpython-agent
test(fallback): fix unused imports and type annotations
xf gong5ae50b5f1958
diff --git a/tests/providers/test_fallback.py b/tests/providers/test_fallback.pyindex 5b1bc0f..a5d4da6 100644--- a/tests/providers/test_fallback.py+++ b/tests/providers/test_fallback.py@@ -1,6 +1,5 @@from __future__ import annotations-import asynciofrom typing import Anyimport pytest@@ -22,8 +21,9 @@ from cubepi.providers.base import (Model,StreamOptions,TextContent,+ ThinkingBudgets,+ ThinkingLevel,ToolDefinition,- Usage,UserMessage,)from cubepi.providers.faux import FauxProvider, faux_assistant_message@@ -58,8 +58,8 @@ class _RaisingProvider(BaseProvider):options: StreamOptions | None = None,max_output_tokens: int | None = None,temperature: float | None = None,- thinking: Any = None,- thinking_budgets: Any = None,+ thinking: ThinkingLevel | None = None,+ thinking_budgets: ThinkingBudgets | None = None,) -> AssistantMessage:raise self._error@@ -80,6 +80,20 @@ def _messages() -> list[Message]:return [UserMessage(content=[TextContent(text="hi")])]+# ---------------------------------------------------------------------------+# DEFAULT_TRIGGER_ERRORS tests+# ---------------------------------------------------------------------------+++def test_default_trigger_errors_composition() -> None:+ """DEFAULT_TRIGGER_ERRORS contains the right three error types."""+ assert RateLimited in DEFAULT_TRIGGER_ERRORS+ assert ProviderUnavailable in DEFAULT_TRIGGER_ERRORS+ assert ContextLengthExceeded in DEFAULT_TRIGGER_ERRORS+ assert ProviderAuthFailed not in DEFAULT_TRIGGER_ERRORS+ assert ProviderBadRequest not in DEFAULT_TRIGGER_ERRORS++# ---------------------------------------------------------------------------# stream() tests# ---------------------------------------------------------------------------