Closed Djelibeybi closed 3 years ago
I kinda want tests. https://github.com/delfick/photons/blob/main/apps/interactor/tests/commander/commands/test_effects.py
Annoyingly I thought I had tests for options but it seems I don't for effects/start either.
(I'd add calls to a GetPower command before and after with and without power_on option).
Also, commit message is good, but can the first sentence be [interactor] matrix and linear options for effects/stop
please? :)
Yep, let me throw in some tests.
I'd add calls to a GetPower command before and after with and without power_on option
I'm not sure I understand what you mean by this?
I meant the interactor command for sending messages.
But easier would be something like
device = fake.for_serial("d073d5000001")
# for testing off
assert device.attrs.power == 0
# for testing on
assert device.attrs.power == 65535
Gotcha. Ok, let me simplify this. :)
I added three tests. Let me know if this is enough, not enough, etc.
Aside: VSCode's auto-linter hates the test_<blah>.py
files. It's just red wavy lines as far as the eye can see.
Nice!
Are you able to add test that shows the power goes stays off if power_on is false please?
Aside: VSCode's auto-linter hates the test_
.py files. It's just red wavy lines as far as the eye can see.
lol It's very standard naming scheme and it's how pytest discovers tests
Are you able to add test that shows the power goes stays off if power_on is false please?
Sure. Done. :)
Perfect. Thanks.
This exposes the power_on argument so that users can stop effects when the devices are soft off.
This resolves issue #64 (or at least the initial request) which is to prevent a device from powering on.
Signed-off-by: Avi Miller me@dje.li