Files
llm-connect/tests/conftest.py
Bernd Worsch d71f4114d1 feat: WP-0001 foundation + WP-0002 core extensions
WP-0001 — Foundation & GAAF Baseline
- SCOPE.md, ARCHITECTURE-LAYERS.md, contracts/ tree
- .claude/rules/ stubs filled (architecture, stack, boundary)
- 57 tests (pytest), pyproject.toml with ruff+mypy, CI workflow

WP-0002 — Core Extensions (FR-4 + FR-3)
- FR-4: BudgetTracker (thread-safe) + LLMBudgetExceededError +
  optional RunConfig.budget_tracker + enforcement in all adapters
- FR-3: async_execute_prompt on LLMAdapter ABC (asyncio.to_thread
  fallback) + native asyncio.create_subprocess_exec in ClaudeCodeAdapter

81 tests passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 22:24:14 +00:00

27 lines
558 B
Python

"""
Shared pytest fixtures for llm-connect tests.
"""
import pytest
from llm_connect.models import RunConfig, LLMResponse
from llm_connect.adapter import MockLLMAdapter
@pytest.fixture
def run_config():
"""Default RunConfig for tests."""
return RunConfig()
@pytest.fixture
def mock_adapter():
"""MockLLMAdapter with a predictable response."""
return MockLLMAdapter(mock_response="test response")
@pytest.fixture
def sample_response():
"""A minimal valid LLMResponse."""
return LLMResponse(content="hello", model="test-model")