Skip to content
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

Merged
merged 4 commits into from
Nov 1, 2017
Merged

add some tests to vacuum #100

merged 4 commits into from
Nov 1, 2017

Conversation

rytilahti
Copy link
Owner

No description provided.

STATE_ERROR = 12
STATE_PAUSED = 10
STATE_MANUAL = 7
def __init__(self, *args, **kwargs):

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

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

@rytilahti rytilahti force-pushed the initial_vacuum_tests branch from b8576de to bdb43a1 Compare October 22, 2017 01:02
@@ -0,0 +1,189 @@
from unittest import TestCase
from miio import Yeelight
from miio.yeelight import YeelightMode, YeelightStatus, YeelightException

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


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

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)

self.device._reset_state()

assert self.is_on() is True
assert self.state().temperature == self.device.start_state["temperature"]

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)

@coveralls
Copy link

coveralls commented Oct 24, 2017

Coverage Status

Coverage increased (+8.8%) to 42.818% when pulling f0ab986 on initial_vacuum_tests into 61874e3 on master.

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..
@rytilahti rytilahti force-pushed the initial_vacuum_tests branch from f0ab986 to f17c91e Compare October 26, 2017 21:10
@coveralls
Copy link

coveralls commented Oct 26, 2017

Coverage Status

Coverage increased (+3.3%) to 42.818% when pulling f17c91e on initial_vacuum_tests into c859d51 on master.

@rytilahti rytilahti merged commit 057ab4e into master Nov 1, 2017
@rytilahti rytilahti deleted the initial_vacuum_tests branch November 1, 2017 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants