Files
led-controller/tests
jimmyandClaude Opus 5.5 a5a7fc575f feat(engine): Pi-side animation engine with protocol outputs and sequencer
Add src/engine, modelled on technicalkiwi/portal's player and sequence runner:

- Pixel generator: runs the unchanged led-driver patterns under CPython
  (utime shim + NeoPixel-like buffer) on a per-zone render thread and
  streams frames to pixel outputs, with keepalive for static frames.
- Output drivers: DDP, Art-Net (ArtDMX/ArtSync), sACN/E1.31, USB-DMX
  (Enttec Pro / Open DMX), plus an ESP32 preset output that reuses the
  existing preset + select delivery path. Registry in db/output.json,
  CRUD and test pattern at /outputs.
- Sequencer: timed preset chains per zone (portal step shape), deadline
  scheduling, loop/repeat, resume after restart; legacy sequence records
  are migrated. Zone play/stop, sequence and scene play/stop endpoints.
- CLI (python -m engine.cli), Outputs and Sequences modals, preset tiles
  drive pixel outputs, API/README docs, engine test suite.

ESP32 firmware is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 13:24:14 +13:00
..
2026-01-16 22:31:47 +13:00

Tests

Tests for the LED Controller project live under tests/ (pytest + legacy scripts).

Layout

Path Role
test_endpoints.py HTTP endpoint checks (LED_CONTROLLER_RUN_DEVICE_ENDPOINT_TESTS=1); test_zones / test_zone_edit_workflow hit /zones
test_endpoints_pytest.py Pytest-style endpoint coverage
test_browser.py Selenium UI flows (set LED_CONTROLLER_RUN_BROWSER_TESTS=1 to run; uses test_zones_ui and legacy tabsManager JS aliases)
test_pattern_ota_send.py Pattern OTA / Wi-Fi send helpers
tcp_test_server.py, async_tcp_server.py TCP test doubles for driver protocol
udp_server.py UDP discovery / hello test listener (port 8766)
ws.py WebSocket client checks
p2p.py ESP-NOW–related helpers / experiments
web.py Local dev static server (not the main app)
conftest.py Pytest fixtures
models/ Model unit tests (run_all.py, test_zone.py, …)

Running tests

From the project root (with dev dependencies installed):

pipenv run pytest tests/ -q

Browser tests (real browser)

python tests/test_browser.py

Requires Selenium, Chrome/Chromium, and a matching ChromeDriver.

Model tests only

python tests/models/run_all.py

Local static server

tests/web.py serves files for quick UI experiments; it is not the Microdot app. For the real server use pipenv run run from the repo root.