Skip to content

Commit

Permalink
Non-essential code removed. (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi authored Mar 9, 2018
1 parent 538a547 commit 2bd059c
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 36 deletions.
6 changes: 2 additions & 4 deletions miio/tests/test_airhumidifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,15 @@ def state(self):

def test_on(self):
self.device.off() # ensure off

start_state = self.is_on()
assert start_state is False
assert self.is_on() is False

self.device.on()
assert self.is_on() is True

def test_off(self):
self.device.on() # ensure on

assert self.is_on() is True

self.device.off()
assert self.is_on() is False

Expand Down
6 changes: 2 additions & 4 deletions miio/tests/test_airpurifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,15 @@ def state(self):

def test_on(self):
self.device.off() # ensure off

start_state = self.is_on()
assert start_state is False
assert self.is_on() is False

self.device.on()
assert self.is_on() is True

def test_off(self):
self.device.on() # ensure on

assert self.is_on() is True

self.device.off()
assert self.is_on() is False

Expand Down
6 changes: 2 additions & 4 deletions miio/tests/test_airqualitymonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,15 @@ def state(self):

def test_on(self):
self.device.off() # ensure off

start_state = self.is_on()
assert start_state is False
assert self.is_on() is False

self.device.on()
assert self.is_on() is True

def test_off(self):
self.device.on() # ensure on

assert self.is_on() is True

self.device.off()
assert self.is_on() is False

Expand Down
6 changes: 2 additions & 4 deletions miio/tests/test_ceil.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,15 @@ def state(self):

def test_on(self):
self.device.off() # ensure off

start_state = self.is_on()
assert start_state is False
assert self.is_on() is False

self.device.on()
assert self.is_on() is True

def test_off(self):
self.device.on() # ensure on

assert self.is_on() is True

self.device.off()
assert self.is_on() is False

Expand Down
6 changes: 2 additions & 4 deletions miio/tests/test_philips_bulb.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,15 @@ def state(self):

def test_on(self):
self.device.off() # ensure off

start_state = self.is_on()
assert start_state is False
assert self.is_on() is False

self.device.on()
assert self.is_on() is True

def test_off(self):
self.device.on() # ensure on

assert self.is_on() is True

self.device.off()
assert self.is_on() is False

Expand Down
6 changes: 2 additions & 4 deletions miio/tests/test_philips_eyecare.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,15 @@ def state(self):

def test_on(self):
self.device.off() # ensure off

start_state = self.is_on()
assert start_state is False
assert self.is_on() is False

self.device.on()
assert self.is_on() is True

def test_off(self):
self.device.on() # ensure on

assert self.is_on() is True

self.device.off()
assert self.is_on() is False

Expand Down
6 changes: 2 additions & 4 deletions miio/tests/test_plug.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,15 @@ def state(self):

def test_on(self):
self.device.off() # ensure off

start_state = self.is_on()
assert start_state is False
assert self.is_on() is False

self.device.on()
assert self.is_on() is True

def test_off(self):
self.device.on() # ensure on

assert self.is_on() is True

self.device.off()
assert self.is_on() is False

Expand Down
6 changes: 2 additions & 4 deletions miio/tests/test_plug_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,15 @@ def state(self):

def test_on(self):
self.device.off() # ensure off

start_state = self.is_on()
assert start_state is False
assert self.is_on() is False

self.device.on()
assert self.is_on() is True

def test_off(self):
self.device.on() # ensure on

assert self.is_on() is True

self.device.off()
assert self.is_on() is False

Expand Down
6 changes: 2 additions & 4 deletions miio/tests/test_powerstrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,15 @@ def state(self):

def test_on(self):
self.device.off() # ensure off

start_state = self.is_on()
assert start_state is False
assert self.is_on() is False

self.device.on()
assert self.is_on() is True

def test_off(self):
self.device.on() # ensure on

assert self.is_on() is True

self.device.off()
assert self.is_on() is False

Expand Down
2 changes: 2 additions & 0 deletions miio/tests/test_yeelight.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@ def test_status(self):
def test_on(self):
self.device.off() # make sure we are off
assert self.device.status().is_on is False

self.device.on()
assert self.device.status().is_on is True

def test_off(self):
self.device.on() # make sure we are on
assert self.device.status().is_on is True

self.device.off()
assert self.device.status().is_on is False

Expand Down

0 comments on commit 2bd059c

Please sign in to comment.