🏡 Open source home automation that puts local control and privacy first.
Go to file
Marc Khouri 72c35468b3 Remove asyncio.test_utils to fix tests in Docker/Python 3.7 (#12102)
The module `asyncio.test_utils` has been removed from Python in the 3.7 branch, because it was intended to be a private module for internal testing of asyncio. For more information, see the upstream bug report at https://bugs.python.org/issue32273 and the upstream PR at https://github.com/python/cpython/pull/4785.

For this commit, I have migrated the small amount of functionality that was being used from the `asyncio.test_utils` directly into the `RunThreadsafeTests` Class. To see the original `asyncio.test_utils.TestCase` class, which I pulled some functionality from, please see: https://github.com/python/cpython/blob/3.6/Lib/asyncio/test_utils.py#L440

Note: In addition to being broken in 3.7, this test case also seems to be broken in Python 3.6.4 when using Docker. This PR fixes the test when run in docker.

To reproduce: `./script/test_docker -- tests/util/test_async.py`
failing output (prior to this commit):

```
... trimmed ...
py36 runtests: PYTHONHASHSEED='3262989550'
py36 runtests: commands[0] | py.test --timeout=9 --duration=10 --cov --cov-report= tests/util/test_async.py
Test session starts (platform: linux, Python 3.6.4, pytest 3.3.1, pytest-sugar 0.9.0)
rootdir: /usr/src/app, inifile: setup.cfg
plugins: timeout-1.2.1, sugar-0.9.0, cov-2.5.1, aiohttp-0.3.0
timeout: 9.0s method: signal

―――――――――――――――――― ERROR collecting tests/util/test_async.py ――――――――――――――――――――――――
ImportError while importing test module '/usr/src/app/tests/util/test_async.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/util/test_async.py:3: in <module>
from asyncio import test_utils
/usr/local/lib/python3.6/asyncio/test_utils.py:36: in <module>
from test import support
E ImportError: cannot import name 'support'
```
2018-02-02 14:59:05 +00:00
.github Enable probot move (#11690) 2018-01-16 09:25:13 +01:00
docs Optimised images. Saved 80 KB out of 656 KB. 12.3% overall (up to 32.1% per file) (#10735) 2017-11-21 21:19:13 -08:00
homeassistant Add support for "off" function to iTunes (#12109) 2018-02-02 14:54:47 +00:00
script Pushbullet (fix) invalid keyword, added unittests (#11804) 2018-01-24 21:06:35 +01:00
tests Remove asyncio.test_utils to fix tests in Docker/Python 3.7 (#12102) 2018-02-02 14:59:05 +00:00
virtualization Change telldus domain to download.telldus.com (#11825) 2018-01-20 17:07:45 +01:00
.coveragerc Add Goalfeed platform (#11098) 2018-01-28 14:04:40 +01:00
.dockerignore Docker cleanup. (#8226) 2017-06-30 08:07:33 -07:00
.gitattributes Ensure Docker script files uses LF line endings to support Docker for Windows. (#10067) 2017-12-06 15:00:58 +01:00
.gitignore Typing fixes (#12015) 2018-01-29 00:24:08 -08:00
.gitmodules Consolidate frontend (#9915) 2017-10-24 19:36:27 -07:00
.hound.yml Add .hound.yml 2016-11-13 11:34:09 -08:00
.ignore Include .ignore file for search utilities (#5290) 2017-01-16 22:52:53 -08:00
.travis.yml Reorganize lint travis builds (#10670) 2017-11-19 17:39:24 -08:00
CLA.md Update LICENSE.md and CLA.md to reflect the new Apache 2.0 license 2017-01-28 12:12:34 -08:00
CODEOWNERS Spelling fixes (#11940) 2018-01-27 11:58:27 -08:00
CODE_OF_CONDUCT.md Add organization docs 2017-01-22 16:21:20 -08:00
CONTRIBUTING.md Fix spelling error and update link (#8869) 2017-08-06 21:18:44 +02:00
Dockerfile Change telldus domain to download.telldus.com (#11825) 2018-01-20 17:07:45 +01:00
LICENSE.md Update LICENSE.md and CLA.md to reflect the new Apache 2.0 license 2017-01-28 12:12:34 -08:00
MANIFEST.in Consolidate frontend (#9915) 2017-10-24 19:36:27 -07:00
README.rst Remove links to gitter (#9155) 2017-08-27 11:30:26 +02:00
pylintrc Add support for using credstash as a secret store (#8494) 2017-07-24 08:59:10 -07:00
requirements_all.txt Update jinja2 to 2.10 (#12118) 2018-02-01 19:21:15 +01:00
requirements_docs.txt Upgrade sphinx-autodoc-typehints to 1.2.4 (#11954) 2018-01-27 11:59:19 -08:00
requirements_test.txt Flake8 35 (#11972) 2018-01-29 00:23:53 -08:00
requirements_test_all.txt Bump frontend to 20180130.0 2018-01-29 15:51:43 -08:00
setup.cfg Reorganize lint travis builds (#10670) 2017-11-19 17:39:24 -08:00
setup.py Update jinja2 to 2.10 (#12118) 2018-02-01 19:21:15 +01:00
tox.ini update mypy commandline arguments (#11638) 2018-01-15 22:41:49 +01:00

README.rst

Home Assistant |Build Status| |Coverage Status| |Chat Status|
=============================================================

Home Assistant is a home automation platform running on Python 3. It is able to track and control all devices at home and offer a platform for automating control.

To get started:

.. code:: bash

    python3 -m pip install homeassistant
    hass --open-ui

Check out `home-assistant.io <https://home-assistant.io>`__ for `a
demo <https://home-assistant.io/demo/>`__, `installation instructions <https://home-assistant.io/getting-started/>`__,
`tutorials <https://home-assistant.io/getting-started/automation-2/>`__ and `documentation <https://home-assistant.io/docs/>`__.

|screenshot-states|

Featured integrations
---------------------

|screenshot-components|

The system is built using a modular approach so support for other devices or actions can be implemented easily. See also the `section on architecture <https://home-assistant.io/developers/architecture/>`__ and the `section on creating your own
components <https://home-assistant.io/developers/creating_components/>`__.

If you run into issues while using Home Assistant or during development
of a component, check the `Home Assistant help section <https://home-assistant.io/help/>`__ of our website for further help and information.

.. |Build Status| image:: https://travis-ci.org/home-assistant/home-assistant.svg?branch=master
   :target: https://travis-ci.org/home-assistant/home-assistant
.. |Coverage Status| image:: https://img.shields.io/coveralls/home-assistant/home-assistant.svg
   :target: https://coveralls.io/r/home-assistant/home-assistant?branch=master
.. |Chat Status| image:: https://img.shields.io/discord/330944238910963714.svg
   :target: https://discord.gg/c5DvZ4e
.. |screenshot-states| image:: https://raw.github.com/home-assistant/home-assistant/master/docs/screenshots.png
   :target: https://home-assistant.io/demo/
.. |screenshot-components| image:: https://raw.github.com/home-assistant/home-assistant/dev/docs/screenshot-components.png
   :target: https://home-assistant.io/components/