Conversation
houndci-bot
reviewed
Oct 21, 2017
| STATE_ERROR = 12 | ||
| STATE_PAUSED = 10 | ||
| STATE_MANUAL = 7 | ||
| def __init__(self, *args, **kwargs): |
| import pytest | ||
| from .dummies import DummyDevice | ||
| import datetime | ||
| from miio import Vacuum, VacuumStatus, VacuumException |
There was a problem hiding this comment.
'miio.VacuumStatus' imported but unused
'miio.VacuumException' imported but unused
b8576de to
bdb43a1
Compare
houndci-bot
reviewed
Oct 22, 2017
| @@ -0,0 +1,189 @@ | |||
| from unittest import TestCase | |||
| from miio import Yeelight | |||
| from miio.yeelight import YeelightMode, YeelightStatus, YeelightException | |||
There was a problem hiding this comment.
'miio.yeelight.YeelightStatus' imported but unused
|
|
||
| assert self.is_on() is True | ||
| assert self.state().temperature == self.device.start_state["temperature"] | ||
| assert self.state().load_power == self.device.start_state["current"] * 110 |
There was a problem hiding this comment.
line too long (82 > 79 characters)
| self.device._reset_state() | ||
|
|
||
| assert self.is_on() is True | ||
| assert self.state().temperature == self.device.start_state["temperature"] |
There was a problem hiding this comment.
line too long (81 > 79 characters)
To demonstrate its functionality unittests for yeelight and plug are included in this commit. It also allowed to spot a couple of bugs in yeelight already..
…but this can serve as a starting point
f0ab986 to
f17c91e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.