🏡 Open source home automation that puts local control and privacy first.
Go to file
Joakim Plate c576a68d33
Upgrade pytest-aiohttp (#82475)
* Upgrade pytest-aiohttp

* Make sure executors, tasks and timers are closed

Some test will trigger warnings on garbage collect, these warnings
spills over into next test.

Some test trigger tasks that raise errors on shutdown, these spill
over into next test.

This is to mimic older pytest-aiohttp and it's behaviour on test
cleanup.

Discussions on similar changes for pytest-aiohttp are here:
https://github.com/pytest-dev/pytest-asyncio/pull/309

* Replace loop with event_loop

* Make sure time is frozen for tests

* Make sure the ConditionType is not async

  /home-assistant/homeassistant/helpers/template.py:2082: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
    def wrapper(*args, **kwargs):
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

* Increase litejet press tests with a factor 10

The times are simulated anyway, and we can't stop the normal
event from occuring.

* Use async handlers for aiohttp

tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
  /Users/joakim/src/hass/home-assistant/venv/lib/python3.9/site-packages/aiohttp/web_urldispatcher.py:189: DeprecationWarning: Bare functions are deprecated, use async ones
    warnings.warn(

* Switch to freezegun in modbus tests

The tests allowed clock to tick in between steps

* Make sure skybell object are fully mocked

Old tests would trigger attempts to post to could services:

```
DEBUG:aioskybell:HTTP post https://cloud.myskybell.com/api/v3/login/ Request with headers: {'content-type': 'application/json', 'accept': '*/*', 'x-skybell-app-id': 'd2b542c7-a7e4-4e1e-b77d-2b76911c7c46', 'x-skybell-client-id': '1f36a3c0-6dee-4997-a6db-4e1c67338e57'}
```

* Fix sorting that broke after rebase
2022-11-29 22:36:36 +01:00
.devcontainer Update devcontainer appPort to allow connections from external IPs (#79730) 2022-10-25 21:06:56 +02:00
.github Tweak pytest-durations CI parameters (#82918) 2022-11-29 13:30:26 +01:00
.vscode Add "Home Assistant (skip pip)" to VS Code launch.json (#74887) 2022-07-10 23:06:27 +02:00
docs Update screenshot (#79459) 2022-10-10 20:20:25 +02:00
homeassistant Upgrade pytest-aiohttp (#82475) 2022-11-29 22:36:36 +01:00
machine Update Builder & Wheels + support yellow (#73896) 2022-06-23 13:58:24 +02:00
pylint/plugins Enforce VacuumEntityFeature (#82466) 2022-11-22 07:27:27 +01:00
rootfs Fix logging & exit code reporting to S6 on HA shutdown (#72921) 2022-06-02 19:49:08 +02:00
script Upgrade pytest-aiohttp (#82475) 2022-11-29 22:36:36 +01:00
tests Upgrade pytest-aiohttp (#82475) 2022-11-29 22:36:36 +01:00
.core_files.yaml Trigger full CI on Text integration changes (#82907) 2022-11-29 15:49:10 +01:00
.coveragerc Add Do Not Disturb sensor to Slack (#72380) 2022-11-27 15:31:38 -05:00
.dockerignore Not to Tox (#76582) 2022-11-23 14:40:37 +01:00
.gitattributes highlight Dockerfile.dev as Dockerfile in github ui (#36933) 2020-06-22 14:45:57 +02:00
.gitignore Not to Tox (#76582) 2022-11-23 14:40:37 +01:00
.hadolint.yaml Add hadolint to CI (#34758) 2020-04-27 12:09:31 +02:00
.pre-commit-config.yaml Update codespell to 2.2.2 (#82856) 2022-11-28 17:52:15 +01:00
.prettierignore Add Leviton brand (#79244) 2022-09-29 12:28:51 +02:00
.readthedocs.yml Update readthedocs config (#65230) 2022-01-30 20:15:32 -08:00
.strict-typing Strict typing derivative (#82785) 2022-11-28 15:12:22 +01:00
.yamllint Add yamllint (in pre-commit and CI) (#33676) 2020-04-05 10:33:45 +02:00
CLA.md
CODEOWNERS Remove as codeowner for tado (#82919) 2022-11-29 13:58:53 +01:00
CODE_OF_CONDUCT.md Update CODE_OF_CONDUCT.md (#73468) 2022-06-23 01:41:22 +02:00
CONTRIBUTING.md Use core GitHub URL in contributing guidelines (#41083) 2020-10-02 20:42:33 +02:00
Dockerfile Add nightly frontend to nightly builds (#74327) 2022-07-02 09:04:35 -07:00
Dockerfile.dev Uninstall pre-installed tools from devcontainer (#79765) 2022-10-07 02:16:38 +03:00
LICENSE.md
MANIFEST.in Move remaining keys to `setup.cfg` (#65154) 2022-01-28 20:18:09 -08:00
README.rst Update featured integrations image (#76011) 2022-08-02 09:09:24 +02:00
build.yaml Update base image to 2022.11.0 (#82527) 2022-11-24 19:21:42 +01:00
codecov.yml Add little slack to CodeCov project/config-flows threshold (#63379) 2022-01-04 16:26:22 +01:00
mypy.ini Strict typing derivative (#82785) 2022-11-28 15:12:22 +01:00
pyproject.toml Upgrade pytest-aiohttp (#82475) 2022-11-29 22:36:36 +01:00
requirements.txt Update aiohttp to 3.8.3 (#78860) 2022-11-28 20:42:10 +01:00
requirements_all.txt Bump pycsspeechtts to v1.0.8 (#82922) 2022-11-29 16:06:44 +01:00
requirements_docs.txt
requirements_test.txt Upgrade pytest-aiohttp (#82475) 2022-11-29 22:36:36 +01:00
requirements_test_all.txt Update xknx to 2.1.0 (#82930) 2022-11-29 16:03:03 +01:00
requirements_test_pre_commit.txt Update codespell to 2.2.2 (#82856) 2022-11-28 17:52:15 +01:00
setup.cfg Not to Tox (#76582) 2022-11-23 14:40:37 +01:00

README.rst

Home Assistant |Chat Status|
=================================================================================

Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.

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/>`__ and `documentation <https://home-assistant.io/docs/>`__.

|screenshot-states|

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

|screenshot-integrations|

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://developers.home-assistant.io/docs/architecture_index/>`__ and the `section on creating your own
components <https://developers.home-assistant.io/docs/creating_component_index/>`__.

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.

.. |Chat Status| image:: https://img.shields.io/discord/330944238910963714.svg
   :target: https://discord.gg/c5DvZ4e
.. |screenshot-states| image:: https://raw.githubusercontent.com/home-assistant/core/master/docs/screenshots.png
   :target: https://home-assistant.io/demo/
.. |screenshot-integrations| image:: https://raw.githubusercontent.com/home-assistant/core/dev/docs/screenshot-integrations.png
   :target: https://home-assistant.io/integrations/