properly cleanup after config test

This commit is contained in:
Paulus Schoutsen 2016-07-03 18:24:17 -07:00
parent ffccca1f60
commit 659d67f362

View File

@ -22,6 +22,7 @@ from tests.common import (
CONFIG_DIR = get_test_config_dir() CONFIG_DIR = get_test_config_dir()
YAML_PATH = os.path.join(CONFIG_DIR, config_util.YAML_CONFIG_FILE) YAML_PATH = os.path.join(CONFIG_DIR, config_util.YAML_CONFIG_FILE)
VERSION_PATH = os.path.join(CONFIG_DIR, config_util.VERSION_FILE)
ORIG_TIMEZONE = dt_util.DEFAULT_TIME_ZONE ORIG_TIMEZONE = dt_util.DEFAULT_TIME_ZONE
@ -41,6 +42,9 @@ class TestConfig(unittest.TestCase):
if os.path.isfile(YAML_PATH): if os.path.isfile(YAML_PATH):
os.remove(YAML_PATH) os.remove(YAML_PATH)
if os.path.isfile(VERSION_PATH):
os.remove(VERSION_PATH)
if hasattr(self, 'hass'): if hasattr(self, 'hass'):
self.hass.stop() self.hass.stop()