-
-
Notifications
You must be signed in to change notification settings - Fork 563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add some tests to vacuum #100
Conversation
STATE_ERROR = 12 | ||
STATE_PAUSED = 10 | ||
STATE_MANUAL = 7 | ||
def __init__(self, *args, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected 1 blank line, found 0
import pytest | ||
from .dummies import DummyDevice | ||
import datetime | ||
from miio import Vacuum, VacuumStatus, VacuumException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'miio.VacuumStatus' imported but unused
'miio.VacuumException' imported but unused
b8576de
to
bdb43a1
Compare
miio/tests/test_yeelight.py
Outdated
@@ -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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'miio.yeelight.YeelightStatus' imported but unused
miio/tests/test_plug.py
Outdated
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (82 > 79 characters)
miio/tests/test_plug.py
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
No description provided.