mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
parent
dc53c21548
commit
4f0064b00e
@ -204,8 +204,6 @@ class HomeAssistant(object):
|
||||
except KeyboardInterrupt:
|
||||
self.loop.call_soon(stop_homeassistant)
|
||||
self.loop.run_forever()
|
||||
finally:
|
||||
self.loop.close()
|
||||
|
||||
@asyncio.coroutine
|
||||
def async_start(self):
|
||||
|
@ -79,6 +79,7 @@ def get_test_home_assistant(num_threads=None):
|
||||
with patch.object(ha, 'async_create_timer', return_value=None):
|
||||
with patch.object(ha, 'async_monitor_worker_pool',
|
||||
return_value=None):
|
||||
with patch.object(hass.loop, 'add_signal_handler'):
|
||||
orig_start()
|
||||
hass.block_till_done()
|
||||
|
||||
|
@ -2,8 +2,6 @@
|
||||
# pylint: disable=protected-access,too-many-public-methods
|
||||
# pylint: disable=too-few-public-methods
|
||||
import asyncio
|
||||
import os
|
||||
import signal
|
||||
import unittest
|
||||
from unittest.mock import patch, MagicMock
|
||||
from datetime import datetime, timedelta
|
||||
@ -15,8 +13,7 @@ from homeassistant.exceptions import InvalidEntityFormatError
|
||||
import homeassistant.util.dt as dt_util
|
||||
from homeassistant.util.unit_system import (METRIC_SYSTEM)
|
||||
from homeassistant.const import (
|
||||
__version__, EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP,
|
||||
EVENT_STATE_CHANGED, ATTR_FRIENDLY_NAME, CONF_UNIT_SYSTEM)
|
||||
__version__, EVENT_STATE_CHANGED, ATTR_FRIENDLY_NAME, CONF_UNIT_SYSTEM)
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user