Disable too-many-* (#4107)

* Disable too-many-* and too-few-public-methods

* Remove globally disabled pylint warnings
This commit is contained in:
Fabian Affolter authored and GitHub committed 2016-10-30 22:18:53 +01:00
1 parent b910a9917d
commit be272ac64a
298 files changed
+271 -570

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
"""Test the entity helper."""
# pylint: disable=protected-access,too-many-public-methods
# pylint: disable=protected-access
import asyncio
from unittest.mock import MagicMock
+1 -1
View File
@@ -1,5 +1,5 @@
"""The tests for the Entity component helper."""
# pylint: disable=protected-access,too-many-public-methods
# pylint: disable=protected-access
from collections import OrderedDict
import logging
import unittest
+5 -4
View File
@@ -1,6 +1,5 @@
"""Test event helpers."""
# pylint: disable=protected-access,too-many-public-methods
# pylint: disable=too-few-public-methods
# pylint: disable=protected-access
import asyncio
import unittest
from datetime import datetime, timedelta
@@ -28,11 +27,13 @@ from tests.common import get_test_home_assistant
class TestEventHelpers(unittest.TestCase):
"""Test the Home Assistant event helpers."""
def setUp(self): # pylint: disable=invalid-name
# pylint: disable=invalid-name
def setUp(self):
"""Setup things to be run when tests are started."""
self.hass = get_test_home_assistant()
def tearDown(self): # pylint: disable=invalid-name
# pylint: disable=invalid-name
def tearDown(self):
"""Stop everything that was started."""
self.hass.stop()
+5 -4
View File
@@ -1,6 +1,5 @@
"""Test event decorator helpers."""
# pylint: disable=protected-access,too-many-public-methods
# pylint: disable=too-few-public-methods
# pylint: disable=protected-access
import unittest
from datetime import datetime, timedelta
@@ -20,7 +19,8 @@ from tests.common import get_test_home_assistant
class TestEventDecoratorHelpers(unittest.TestCase):
"""Test the Home Assistant event helpers."""
def setUp(self): # pylint: disable=invalid-name
# pylint: disable=invalid-name
def setUp(self):
"""Setup things to be run when tests are started."""
self.hass = get_test_home_assistant()
self.hass.states.set("light.Bowl", "on")
@@ -28,7 +28,8 @@ class TestEventDecoratorHelpers(unittest.TestCase):
event_decorators.HASS = self.hass
def tearDown(self): # pylint: disable=invalid-name
# pylint: disable=invalid-name
def tearDown(self):
"""Stop everything that was started."""
self.hass.stop()
event_decorators.HASS = None
+5 -3
View File
@@ -1,5 +1,5 @@
"""Test component helpers."""
# pylint: disable=protected-access,too-many-public-methods
# pylint: disable=protected-access
from collections import OrderedDict
import unittest
@@ -11,11 +11,13 @@ from tests.common import get_test_home_assistant
class TestHelpers(unittest.TestCase):
"""Tests homeassistant.helpers module."""
def setUp(self): # pylint: disable=invalid-name
# pylint: disable=invalid-name
def setUp(self):
"""Init needed objects."""
self.hass = get_test_home_assistant()
def tearDown(self): # pylint: disable=invalid-name
# pylint: disable=invalid-name
def tearDown(self):
"""Stop everything that was started."""
self.hass.stop()
-1
View File
@@ -1,5 +1,4 @@
"""Tests Home Assistant location helpers."""
# pylint: disable=too-many-public-methods
import unittest
from homeassistant.const import ATTR_LATITUDE, ATTR_LONGITUDE
+5 -3
View File
@@ -1,5 +1,5 @@
"""The tests for the Script component."""
# pylint: disable=too-many-public-methods,protected-access
# pylint: disable=protected-access
from datetime import timedelta
from unittest import mock
import unittest
@@ -18,11 +18,13 @@ ENTITY_ID = 'script.test'
class TestScriptHelper(unittest.TestCase):
"""Test the Script component."""
def setUp(self): # pylint: disable=invalid-name
# pylint: disable=invalid-name
def setUp(self):
"""Setup things to be run when tests are started."""
self.hass = get_test_home_assistant()
def tearDown(self): # pylint: disable=invalid-name
# pylint: disable=invalid-name
def tearDown(self):
"""Stop down everything that was started."""
self.hass.stop()
+4 -3
View File
@@ -1,5 +1,4 @@
"""Test Home Assistant template helper methods."""
# pylint: disable=too-many-public-methods
import unittest
from unittest.mock import patch
@@ -22,14 +21,16 @@ from tests.common import get_test_home_assistant
class TestHelpersTemplate(unittest.TestCase):
"""Test the Template."""
def setUp(self): # pylint: disable=invalid-name
# pylint: disable=invalid-name
def setUp(self):
"""Setup the tests."""
self.hass = get_test_home_assistant()
self.hass.config.units = UnitSystem('custom', TEMP_CELSIUS,
LENGTH_METERS, VOLUME_LITERS,
MASS_GRAMS)
def tearDown(self): # pylint: disable=invalid-name
# pylint: disable=invalid-name
def tearDown(self):
"""Stop down stuff we started."""
self.hass.stop()