"""Pytest configuration and fixtures.""" import pytest from pathlib import Path @pytest.fixture def test_data_dir(tmp_path): """Provide a temporary directory for test data.""" return tmp_path / "data" @pytest.fixture def test_config_dir(tmp_path): """Provide a temporary directory for test configuration.""" return tmp_path / "config" @pytest.fixture def sample_calibration(): """Provide a sample calibration configuration.""" return { "layout": "clockwise", "start_position": "bottom_left", "segments": [ {"edge": "bottom", "led_start": 0, "led_count": 40, "reverse": False}, {"edge": "right", "led_start": 40, "led_count": 30, "reverse": False}, {"edge": "top", "led_start": 70, "led_count": 40, "reverse": True}, {"edge": "left", "led_start": 110, "led_count": 40, "reverse": True}, ], } @pytest.fixture def sample_device(): """Provide a sample device configuration.""" return { "id": "test_device_001", "name": "Test WLED Device", "url": "http://192.168.1.100", "led_count": 150, "enabled": True, "settings": { "display_index": 0, "fps": 30, "border_width": 10, "brightness": 0.8, }, }