Update for file header, docstrings, and PEP8/PEP257

This commit is contained in:
Fabian Affolter
2016-02-13 14:19:11 +01:00
parent 34b91cf6ce
commit 00afaac54c
74 changed files with 212 additions and 211 deletions
+3
View File
@@ -1,4 +1,7 @@
"""
tests.util.test_color
~~~~~~~~~~~~~~~~~~~~~
Tests Home Assistant color util methods.
"""
import unittest
+2 -2
View File
@@ -1,6 +1,6 @@
"""
tests.test_util
~~~~~~~~~~~~~~~~~
tests.util.test_dt
~~~~~~~~~~~~~~~~~~
Tests Home Assistant date util methods.
"""
+2 -2
View File
@@ -1,6 +1,6 @@
"""
tests.test_util
~~~~~~~~~~~~~~~~~
tests.util.test_init
~~~~~~~~~~~~~~~~~~~~
Tests Home Assistant util methods.
"""
+8 -5
View File
@@ -1,4 +1,7 @@
"""
tests.util.test_packages
~~~~~~~~~~~~~~~~~~~~~~~~
Tests Home Assistant package util methods.
"""
import os
@@ -18,26 +21,26 @@ TEST_ZIP_REQ = 'file://{}#{}' \
class TestPackageUtil(unittest.TestCase):
""" Tests for homeassistant.util.package module """
""" Tests for homeassistant.util.package module. """
def setUp(self):
""" Create local library for testing """
""" Create local library for testing. """
self.tmp_dir = tempfile.TemporaryDirectory()
self.lib_dir = os.path.join(self.tmp_dir.name, 'lib')
def tearDown(self):
""" Remove local library """
""" Remove local library. """
self.tmp_dir.cleanup()
def test_install_existing_package(self):
""" Test an install attempt on an existing package """
""" Test an install attempt on an existing package. """
self.assertTrue(package.check_package_exists(
TEST_EXIST_REQ, self.lib_dir))
self.assertTrue(package.install_package(TEST_EXIST_REQ))
def test_install_package_zip(self):
""" Test an install attempt from a zip path """
""" Test an install attempt from a zip path. """
self.assertFalse(package.check_package_exists(
TEST_ZIP_REQ, self.lib_dir))
self.assertFalse(package.check_package_exists(
+3 -3
View File
@@ -1,8 +1,8 @@
"""
tests.test_util
~~~~~~~~~~~~~~~~~
tests.util.test_template
~~~~~~~~~~~~~~~~~~~~~~~~
Tests Home Assistant util methods.
Tests Home Assistant template util methods.
"""
# pylint: disable=too-many-public-methods
import unittest