Update for file header, docstrings, and PEP8/PEP257
This commit is contained in:
parent
34b91cf6ce
commit
00afaac54c
74 changed files with 212 additions and 211 deletions
|
@ -24,12 +24,10 @@ from tests.common import get_test_home_assistant, mock_service
|
|||
|
||||
|
||||
class TestStateHelpers(unittest.TestCase):
|
||||
"""
|
||||
Tests the Home Assistant event helpers.
|
||||
"""
|
||||
""" Tests the Home Assistant event helpers. """
|
||||
|
||||
def setUp(self): # pylint: disable=invalid-name
|
||||
""" things to be run when tests are started. """
|
||||
""" Things to be run when tests are started. """
|
||||
self.hass = get_test_home_assistant()
|
||||
core_components.setup(self.hass, {})
|
||||
|
||||
|
@ -166,9 +164,9 @@ class TestStateHelpers(unittest.TestCase):
|
|||
|
||||
def test_as_number_coercion(self):
|
||||
for _state in ('0', '0.0'):
|
||||
self.assertEqual(
|
||||
0.0, float(state.state_as_number(
|
||||
ha.State('domain.test', _state, {}))))
|
||||
self.assertEqual(0.0, float(
|
||||
state.state_as_number(
|
||||
ha.State('domain.test', _state, {}))))
|
||||
for _state in ('1', '1.0'):
|
||||
self.assertEqual(
|
||||
1.0, float(state.state_as_number(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue