mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-08-07 03:38:06 +00:00
test: replace can't-fail tests with real assertions
test_font_manager.py was 5 of 6 tests shaped as 'try: call(); assert True / except: assert True' — running in CI while unable to fail on any regression. Rewritten against the real FontManager API and the bundled assets/fonts: returned font types, cache-hit identity, distinct entries per size, default-font fallback for unknown families and corrupt files (recorded in failed_loads), BDF native-size reading, text measurement, and cache lifecycle. test_display_manager.py's test_draw_text ended in 'assert True'; it now renders onto a known-black canvas and asserts pixels were actually lit — which required un-breaking the fixture's freetype MagicMock so draw_text's isinstance check doesn't silently swallow the draw. test_display_controller.py carried a permanently-skipped test whose skip reason already declared it redundant; deleted. Both display test files now set EMULATOR=true before importing display_manager (the same convention as test_display_dirty_tracking.py) so they collect standalone instead of depending on which test module imports display_manager first. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NohXi78cwsAKtN1sCfxjUh
This commit is contained in:
@@ -15,13 +15,6 @@ class TestDisplayControllerInitialization:
|
||||
assert test_display_controller.plugin_manager is not None
|
||||
assert test_display_controller.available_modes == []
|
||||
|
||||
@pytest.mark.skip(reason="No assertions; init logic is covered by test_init_success and fixture setup")
|
||||
def test_plugin_discovery_and_loading(self, test_display_controller):
|
||||
"""Test plugin discovery and loading during initialization."""
|
||||
pm = test_display_controller.plugin_manager
|
||||
pm.discover_plugins.return_value = ["plugin1", "plugin2"]
|
||||
pm.get_plugin.return_value = MagicMock()
|
||||
|
||||
|
||||
class TestDisplayControllerModeRotation:
|
||||
"""Test display mode rotation logic."""
|
||||
|
||||
Reference in New Issue
Block a user