"""Shared test setup: stub hardware/audio modules before any SUT import. wecker and the alarm styles import RPi.GPIO (hardware) and pygame (audio engine). The tests run off the Pi and without a real audio device, so these are replaced with MagicMocks in sys.modules before wecker/styles are imported. Loaded by pytest before any test module in this directory is collected. """ import sys from unittest.mock import MagicMock sys.modules["RPi"] = MagicMock() sys.modules["RPi.GPIO"] = MagicMock() sys.modules["pygame"] = MagicMock()