mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-08-01 08:48:05 +00:00
fix(plugin-harness): add no-op process_deferred_updates to test double (#391)
The safety harness's VisualTestDisplayManager (base of BoundsCheckingDisplayManager) doesn't implement process_deferred_updates(), which 5 first-party ledmatrix-plugins call unconditionally between set_scrolling_state() and their scroll-position update: news, odds-ticker, ledmatrix-leaderboard, stock-news, and ledmatrix-stocks. Any of them fails the harness with AttributeError the moment it's touched (surfaced when ledmatrix-plugins#177 had to add a local hasattr guard in ledmatrix-stocks just to pass CI). Add the method as a no-op, mirroring the existing "no-op for testing" pattern already used for set_scrolling_state, so these plugins render under the harness without every touching PR needing its own guard.
This commit is contained in:
@@ -454,6 +454,18 @@ class VisualTestDisplayManager:
|
||||
"""Check if display is currently scrolling."""
|
||||
return self._scrolling_state['is_scrolling']
|
||||
|
||||
def process_deferred_updates(self):
|
||||
"""Process any deferred updates (no-op for testing).
|
||||
|
||||
Several ticker-style plugins (news, odds-ticker, leaderboard,
|
||||
stock-news, stocks) call this unconditionally between
|
||||
set_scrolling_state() and their scroll-position update, mirroring the
|
||||
real display_manager's deferred-update queue. This double has no such
|
||||
queue, so there is nothing to process — the no-op just lets those
|
||||
plugins render under the harness instead of raising AttributeError.
|
||||
"""
|
||||
pass
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Utility methods
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user