-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
Milestone
Description
Overview
First phase of test suite overhaul: Create tests_v2/ directory structure with CLI command coverage.
Parent Issue
Scope
- Create
tests_v2/directory structure - Create
tests_v2/conftest.pywith improved fixtures - Create
tests_v2/cli/test_commands.pywith parametrized tests - Does NOT modify existing
tests/
Implementation
1. Create Directory Structure
tests_v2/
├── conftest.py
└── cli/
└── test_commands.py
2. Fixtures in tests_v2/conftest.py
@pytest.fixture
def clean_tool_registry():
"""Isolate tool registry between tests."""
from gaia.agents.base.tools import _TOOL_REGISTRY
saved = _TOOL_REGISTRY.copy()
_TOOL_REGISTRY.clear()
yield _TOOL_REGISTRY
_TOOL_REGISTRY.clear()
_TOOL_REGISTRY.update(saved)
@pytest.fixture
def free_port():
"""Get a free port for testing."""
import socket
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind(('', 0))
return s.getsockname()[1]
@pytest.fixture
def mock_llm():
"""Provide MockLLMProvider for agent testing."""
from gaia.testing import MockLLMProvider
return MockLLMProvider()3. CLI Commands to Test
gaia chat,talk,prompt,llmgaia blender,jira,dockergaia api,mcp,evalgaia summarize,cache
Acceptance Criteria
-
tests_v2/directory created -
tests_v2/conftest.pywith 3 fixtures (clean_tool_registry, free_port, mock_llm) -
tests_v2/cli/test_commands.pywith parametrized --help tests for all commands - Happy-path tests for critical commands (chat, api, mcp)
- All tests pass:
pytest tests_v2/ -v - Existing tests unchanged:
pytest tests/ -vstill passes
Reactions are currently unavailable