mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-08-07 11:48:06 +00:00
test: address review feedback — fixture lifecycle, test names, ClassVar
- ci-fixture-plugin: call display_manager.clear() before rendering (per plugin guidelines — the fixture should model a well-behaved plugin), add a class docstring, and document why Pillow is deliberately not pinned in its requirements.txt (core dependency; harness installs nothing). - Rename two tests whose names contradicted their assertions: test_unparseable_core_version_is_compatible -> test_unparseable_core_with_high_floor_is_blocked, and test_unreadable_secrets_file... -> test_corrupt_secrets_file... - Annotate TestGetSchemaProperty.SCHEMA as ClassVar (RUF012). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NohXi78cwsAKtN1sCfxjUh
This commit is contained in:
@@ -16,10 +16,16 @@ from src.plugin_system.base_plugin import BasePlugin
|
||||
|
||||
|
||||
class CIFixturePlugin(BasePlugin):
|
||||
"""Deterministic CI-only fixture plugin: renders a border + diagonals
|
||||
pattern sized from the display's declared dimensions. Never shipped to
|
||||
devices; exists solely so the plugin safety harness has a real plugin
|
||||
to exercise in CI."""
|
||||
|
||||
def update(self) -> None:
|
||||
"""Nothing to fetch — the render is self-contained."""
|
||||
|
||||
def display(self, force_clear: bool = False) -> None:
|
||||
self.display_manager.clear()
|
||||
width = self.display_manager.matrix.width
|
||||
height = self.display_manager.matrix.height
|
||||
border = tuple(self.config.get("border_color", [0, 255, 0]))
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
# No dependencies — the fixture must load in any environment.
|
||||
#
|
||||
# Pillow is deliberately NOT pinned here even though manager.py imports
|
||||
# PIL: it is a core LEDMatrix dependency (see the repo-root
|
||||
# requirements.txt), so it is always present wherever the harness runs,
|
||||
# and the harness loads plugins with install_deps=False anyway. Pinning
|
||||
# it here would only invite a needless pip install during test runs.
|
||||
|
||||
Reference in New Issue
Block a user