mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 19:21:33 +02:00
on_printer_status_change builds reconcile_stale_active_prints(...) as a call argument, so the coroutine is constructed even when the spawn helper is mocked out. A bare MagicMock retained it in call_args and it finalised unawaited during a later test's GC, surfacing as a PytestUnraisableExceptionWarning attributed to test_printer_sensor_history. Patch spawn_background_task with a side_effect that closes the coroutine, and correct the _state() docstring, which claimed state="IDLE" kept the reconcile-edge branch quiescent when it does the opposite.