generated from coulomb/repo-seed
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>
27 lines
558 B
Python
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")
|