feat(media): Factory dispatcht auf win32 zum SmtcController

This commit is contained in:
2026-04-16 18:16:51 +02:00
parent 802e06acd9
commit 265ca3c212
2 changed files with 15 additions and 4 deletions
+10 -2
View File
@@ -14,8 +14,8 @@ def test_factory_returns_noop_when_disabled():
assert isinstance(controller, NoopController)
def test_factory_returns_noop_on_non_linux():
with patch.object(sys, "platform", "win32"):
def test_factory_returns_noop_on_other_platforms():
with patch.object(sys, "platform", "darwin"):
controller = create_media_controller(enabled=True)
assert isinstance(controller, NoopController)
@@ -38,3 +38,11 @@ async def test_noop_controller_pause_is_noop():
def test_noop_controller_satisfies_protocol():
controller = NoopController()
assert isinstance(controller, MediaController)
@pytest.mark.skipif(sys.platform != "win32", reason="SmtcController nur auf Windows")
def test_factory_returns_smtc_on_win32_when_enabled():
from whisper_local.media._smtc import SmtcController
controller = create_media_controller(enabled=True)
assert isinstance(controller, SmtcController)