Add a virtual pad and an end-to-end test against the simulator, and run tests with pytest.
padcontroller.virtualpad presses pads and sets knobs through padcontroller-in, refusing unless QLC+ last opened shows/test.qxw. tests/test_e2e_pad.py uses it to check can and mover colours in the simulator's /api/state (PAD_E2E=1). pytest is a dev package now, so the plain test functions unittest skipped run too. test_small_eye.py is a rig tester, not a test, so pytest leaves it alone, and the #14 direction assertion now matches the stage map (-179). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d522b1a2cf
commit
18f0ac2dc5
7 files changed
+363
-3
No files matched your search
@@ -66,6 +66,35 @@ Options after the command go to the pad controller (for example `--lock-knobs`).
|
||||
`--no-enable` installs it without starting it at login (start it with
|
||||
`systemctl --user start padcontroller`). `--uninstall` removes the service. Logs: `journalctl --user -u padcontroller -f`.
|
||||
|
||||
### Virtual pad
|
||||
|
||||
`padcontroller.virtualpad` presses pads and turns knobs without touching the
|
||||
pad. It sends into the pad controller's input, so presses get the Play layer
|
||||
and smoothing like the real thing. It refuses unless QLC+ last opened
|
||||
`shows/test.qxw` (127.0.0.1 only); `--force` skips that.
|
||||
|
||||
```bash
|
||||
.venv/bin/python -m padcontroller.virtualpad press 52 # Colour 1 Red
|
||||
.venv/bin/python -m padcontroller.virtualpad press 52 --play # Play held: Colour 2 Red
|
||||
.venv/bin/python -m padcontroller.virtualpad press --pad 1 # by pad number (shows/midi_map.json)
|
||||
.venv/bin/python -m padcontroller.virtualpad cc 34 64
|
||||
```
|
||||
|
||||
`tests/test_e2e_pad.py` uses it to press colour pads and check the simulator's
|
||||
`/api/state`. It drives the live rig, so it only runs with `PAD_E2E=1`:
|
||||
|
||||
```bash
|
||||
PAD_E2E=1 .venv/bin/python -m pytest tests/test_e2e_pad.py -v
|
||||
```
|
||||
|
||||
The rest of the suite runs offline. Use pytest, since most tests are plain
|
||||
`def test_` functions that `unittest` doesn't find (`pipenv install --dev`
|
||||
installs it):
|
||||
|
||||
```bash
|
||||
.venv/bin/python -m pytest
|
||||
```
|
||||
|
||||
## Stage simulator
|
||||
|
||||
`python -m simulator` listens for Art-Net on port 6454 and draws the rig at
|
||||
|
||||
Reference in new issue
Block a user