1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Handle requirements for scripts (#2765)

This commit is contained in:
Johann Kellerman
2016-08-10 08:54:34 +02:00
committed by Paulus Schoutsen
parent a03691455b
commit aadf6a7750
5 changed files with 56 additions and 12 deletions

View File

@@ -3,7 +3,7 @@ import os
import tempfile
import unittest
import homeassistant.bootstrap as bootstrap
from homeassistant.bootstrap import mount_local_lib_path
import homeassistant.util.package as package
RESOURCE_DIR = os.path.abspath(
@@ -21,7 +21,7 @@ class TestPackageUtil(unittest.TestCase):
def setUp(self):
"""Create local library for testing."""
self.tmp_dir = tempfile.TemporaryDirectory()
self.lib_dir = os.path.join(self.tmp_dir.name, 'deps')
self.lib_dir = mount_local_lib_path(self.tmp_dir.name)
def tearDown(self):
"""Stop everything that was started."""
@@ -49,8 +49,6 @@ class TestPackageUtil(unittest.TestCase):
self.assertTrue(package.check_package_exists(
TEST_NEW_REQ, self.lib_dir))
bootstrap._mount_local_lib_path(self.tmp_dir.name)
try:
import pyhelloworld3
except ImportError: