Add animation frame integrity tests #58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "test/issue-49-animation-frame-integrity-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
tests/test_animation_registry.pycovering every registered animation inrgb_aura.animation_registry.enabled_zone_animations().config/device_map.json, so the suite mirrors real runtime conditions without OpenRGB hardware.Coverage
Registry-level invariants (3 tests)
animation_namevalues are unique within the registry.reserved_argb_6_led_zone).Per-animation invariants (parametrized, ×14 animations)
animation_name,logical_zone_name, and a callablebuilder.runtime._build_runtime_zones. Any drift between animation shape and declared zone shape fails here.RgbColor.__post_init__at construction, but asserted explicitly so any future refactor that bypassesRgbColor(e.g. plain tuples) fails fast.DARK_BLUE— for zones withusable_led_indexessmaller thanexpected_zone_led_count, all non-usable positions in every frame must equalDARK_BLUE. Skipped where all LEDs are usable (nothing to constrain).Result on the current registry
DARK_BLUEcheck on its non-usable 3rd LED across all 3 motherboard animations — all pass.Verification
python -m pytest tests/— 77 passed, 11 skipped.ruff format src tests scripts— 30 files already formatted.ruff check src tests scripts— all checks passed.python -m rgb_aura.main --dry-run --dry-run-events 3— clean run, all 14 animations registered, scheduler preview produces events normally.Hardware verification
Not required. Tests call animation builders directly with declared zone shapes; no real SDK, no hardware, no LED write path touched.
Linked issue
Closes #49.
Branch workflow
developtest/issue-49-animation-frame-integrity-testsdevelopmain.Notes for reviewer
tests/conftest.pyhelpers added there — the animation registry tests are self-contained.DARK_BLUE" assertion encodes the current convention seen in animation builders (colors = [DARK_BLUE for _ in range(zone_led_count)]followed by selective writes). If a future animation wants to express a different intent for non-usable LEDs, that decision should be made explicitly with an issue rather than by silently breaking this test.