fix: lazy-import tkinter to fix CI on headless Linux
Some checks failed
Lint & Test / test (push) Failing after 2m16s
Some checks failed
Lint & Test / test (push) Failing after 2m16s
screen_overlay.py imported tkinter at module level, which cascaded through processor_manager → every test touching the app on CI where libtk8.6.so is unavailable. Move to TYPE_CHECKING + runtime lazy import so the overlay module loads cleanly on headless systems. Also fix test_processor_manager.py to use ProcessorDependencies().
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import pytest
|
||||
|
||||
from wled_controller.core.processing.processor_manager import ProcessorManager
|
||||
from wled_controller.core.processing.processor_manager import ProcessorDependencies, ProcessorManager
|
||||
from wled_controller.core.processing.processing_settings import ProcessingSettings
|
||||
from wled_controller.core.capture.calibration import create_default_calibration
|
||||
|
||||
@@ -33,12 +33,12 @@ def mock_wled_responses():
|
||||
@pytest.fixture
|
||||
def processor_manager():
|
||||
"""Provide processor manager instance."""
|
||||
return ProcessorManager()
|
||||
return ProcessorManager(deps=ProcessorDependencies())
|
||||
|
||||
|
||||
def test_processor_manager_init():
|
||||
"""Test processor manager initialization."""
|
||||
manager = ProcessorManager()
|
||||
manager = ProcessorManager(deps=ProcessorDependencies())
|
||||
assert manager is not None
|
||||
assert manager.get_all_devices() == []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user