Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/plugin_system/testing/visual_display_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,18 @@ def is_currently_scrolling(self) -> bool:
"""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
# ------------------------------------------------------------------
Expand Down
10 changes: 10 additions & 0 deletions test/plugins/test_visual_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@ def test_scrolling_state(self):
vdm.set_scrolling_state(False)
assert vdm.is_currently_scrolling() is False

def test_process_deferred_updates_is_noop(self):
# Ticker-style plugins (news, odds-ticker, leaderboard, stock-news,
# stocks) call this unconditionally alongside set_scrolling_state();
# it must exist and be harmless so those plugins render under the
# harness instead of raising AttributeError.
vdm = VisualTestDisplayManager(width=128, height=32)
vdm.set_scrolling_state(True)
vdm.process_deferred_updates() # should not raise
assert vdm.is_currently_scrolling() is True

def test_format_date_with_ordinal(self):
from datetime import datetime
vdm = VisualTestDisplayManager(width=128, height=32)
Expand Down
Loading