Agent2Robot / tests /conftest.py
sam133
Refactor: Restructure codebase with modular design patterns and fix orchestrator implementation
9529bc2
"""
Pytest configuration and fixtures.
"""
import pytest
import os
import sys
# Add src directory to Python path
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../src')))
@pytest.fixture
def mock_llm_response():
"""Mock LLM response for testing."""
return {
"design": {
"type": "robot",
"components": ["body", "wheels", "sensors"],
"specifications": {
"body": {"size": "medium", "material": "metal"},
"wheels": {"count": 4, "type": "standard"},
"sensors": ["camera", "lidar"]
}
}
}
@pytest.fixture
def mock_physics_engine():
"""Mock physics engine for testing."""
class MockPhysicsEngine:
def __init__(self):
self.initialized = False
def initialize(self):
self.initialized = True
return True
def simulate(self, design):
return {"success": True, "metrics": {"distance": 10.0}}
return MockPhysicsEngine()