Skip to content

add some tests to vacuum#100

Merged
rytilahti merged 4 commits intomasterfrom
initial_vacuum_tests
Nov 1, 2017
Merged

add some tests to vacuum#100
rytilahti merged 4 commits intomasterfrom
initial_vacuum_tests

Conversation

@rytilahti
Copy link
Copy Markdown
Owner

No description provided.

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

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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"]
Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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