File size: 1,066 Bytes
9529bc2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"""
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()