core/script
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
..
hassfest Add options flow to enable multiprotocol support on sky connect (#82525) 2022-11-29 16:34:55 -05:00
scaffold Tweak scaffold script (#82705) 2022-11-25 20:12:27 +01:00
translations Fix translations clean up script (#72114) 2022-05-23 11:00:17 +02:00
__init__.py Add init for run inside devcontainer 2019-11-19 13:53:12 +00:00
bootstrap Not to Tox (#76582) 2022-11-23 14:40:37 +01:00
check_dirty Fail if dirty (#16839) 2018-09-25 20:47:51 +02:00
check_format Blacken top level *.py (#25621) 2019-08-01 08:30:49 -07:00
countries.py Allow configuring country and language in core config (#81734) 2022-11-24 23:25:50 +01:00
currencies.py Deduplicate blackening (#81802) 2022-11-09 16:58:20 +01:00
gen_requirements_all.py Upgrade pytest-aiohttp (#82475) 2022-11-29 22:36:36 +01:00
inspect_schemas.py Improve string formatting v4 (#33668) 2020-04-05 16:01:41 +02:00
languages.py Allow configuring country and language in core config (#81734) 2022-11-24 23:25:50 +01:00
lint Not to Tox (#76582) 2022-11-23 14:40:37 +01:00
lint_and_test.py Not to Tox (#76582) 2022-11-23 14:40:37 +01:00
monkeytype Add script to run monkeytype typing on test suite (#14440) 2018-06-21 15:06:05 +02:00
pip_check Bump pyrainbird to 0.6.3 and drop dependency conflict count (#82800) 2022-11-27 14:49:47 -05:00
run-in-env.sh Secure not to activate multiple venv in pre_commit hook (#51715) 2021-06-10 19:27:24 +02:00
server
setup Upgrade to newer Python pip>=21.0 (#59769) 2022-02-07 15:12:04 +01:00
update
version_bump.py Update pyupgrade to 3.1.0 (#80058) 2022-10-11 09:04:52 +02:00