-
-
Notifications
You must be signed in to change notification settings - Fork 561
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
Tests for the Chuangmi IR controller #184
Conversation
miio/tests/test_chuangmi_ir.py
Outdated
except TypeError: | ||
return False | ||
|
||
@pytest.fixture(scope="class") |
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 2 blank lines, found 1
5d7c5d2
to
5557f99
Compare
miio/chuangmi_ir.py
Outdated
@@ -13,7 +13,7 @@ class ChuangmiIrException(DeviceException): | |||
class ChuangmiIr(Device): | |||
"""Main class representing Chuangmi IR Remote Controller.""" | |||
|
|||
def learn(self, key: int): | |||
def learn(self, key: int = 1): |
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.
You have here whitespaces around =
while none for frequency in play, looks fine otherwise so ship it!
Oops, looks like the tests are failing!
@rytilahti Could you check the travis log for an advice? I'm blind and out of ideas. |
miio/tests/test_chuangmi_ir.py
Outdated
super().__init__(args, kwargs) | ||
|
||
@staticmethod | ||
def _ir_play_input_validation(self, payload): |
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.
I think this definition is wrong for a staticmethod, if you remove self
it should start working :-)
miio/tests/test_chuangmi_ir.py
Outdated
'001600160016004100160041001600410016004100160623' \ | ||
'015B005700160E6E' | ||
|
||
class DummyChuangmiIr(DummyDevice, ChuangmiIr): |
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 2 blank lines, found 1
No description provided.