Lazy initialise the worker pool (#4110)

* Lazy initialise the worker pool

* Minimize pool initialization in core tests

* Fix tests on Python 3.4

* Remove passing in thread count to mock HASS

* Tests: Allow pool by default for threaded, disable for async

* Remove JobPriority for thread pool

* Fix wrong block_till_done

* EmulatedHue: Remove unused test code

* Zigbee: do not touch hass.pool

* Init loop in add_job

* Fix core test

* Fix random sensor test
This commit is contained in:
Paulus Schoutsen 2016-10-31 08:47:29 -07:00 committed by GitHub
parent a1e910f1cf
commit 7f699b4261
26 changed files with 140 additions and 185 deletions

View file

@ -111,7 +111,7 @@ class TestNotifyDemo(unittest.TestCase):
}
script.call_from_config(self.hass, conf)
self.hass.pool.block_till_done()
self.hass.block_till_done()
self.assertTrue(len(self.events) == 1)
assert {
'message': 'Test 123 4',