hass-core/tests
J. Nick Koston 164403de20
Add thread safety checks to async_create_task (#116339)
* Add thread safety checks to async_create_task

Calling async_create_task from a thread almost always results in an
fast crash. Since most internals are using async_create_background_task
or other task APIs, and this is the one integrations seem to get wrong
the most, add a thread safety check here

* Add thread safety checks to async_create_task

Calling async_create_task from a thread almost always results in an
fast crash. Since most internals are using async_create_background_task
or other task APIs, and this is the one integrations seem to get wrong
the most, add a thread safety check here

* missed one

* Update homeassistant/core.py

* fix mocks

* one more internal

* more places where internal can be used

* more places where internal can be used

* more places where internal can be used

* internal one more place since this is high volume and was already eager_start
2024-04-28 18:29:00 -04:00
..
auth Bump ruff to 0.3.4 (#112690) 2024-03-26 00:02:16 +01:00
components Add test helper to remove device (#116234) 2024-04-28 18:50:15 +02:00
fixtures Add script to compare alexa locales with upstream (#114247) 2024-04-18 13:41:34 +02:00
hassfest Fix placeholder quotes (#114974) 2024-04-06 13:01:56 +02:00
helpers Move thread safety check in area_registry sooner (#116265) 2024-04-27 09:26:35 +02:00
non_packaged_scripts Add script to compare alexa locales with upstream (#114247) 2024-04-18 13:41:34 +02:00
pylint Allow float for int argument type [pylint plugin] (#114105) 2024-03-27 11:51:27 +01:00
resources
script Generate requirements per supported architecture (#115708) 2024-04-22 19:23:08 +02:00
scripts Add strict connection (#112387) 2024-04-12 14:47:46 +02:00
snapshots Generate ConfigValidationError message from English translations (#113844) 2024-03-25 10:39:30 +01:00
test_util Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
testing_config Remove unused legacy state translations (#112023) 2024-04-14 07:13:17 -04:00
util Deprecate relative_time() in favor of time_since() and time_until() (#111177) 2024-04-24 11:13:07 +02:00
__init__.py
common.py Add thread safety checks to async_create_task (#116339) 2024-04-28 18:29:00 -04:00
conftest.py Add test helper to remove device (#116234) 2024-04-28 18:50:15 +02:00
ignore_uncaught_exceptions.py Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
patch_time.py Make freezegun find event.time_tracker_utcnow (#116284) 2024-04-27 07:08:56 -05:00
ruff.toml Enable Ruff RUF018 (#115485) 2024-04-13 09:56:33 +02:00
syrupy.py Add State.last_reported (#113511) 2024-03-20 21:05:07 +01:00
test_backports.py Deprecated old backports and typing aliases (#114883) 2024-04-06 13:15:30 -10:00
test_block_async_io.py Detect blocking module imports in the event loop (#114488) 2024-03-30 19:51:31 -10:00
test_bootstrap.py Reduce scope of bootstrap test fixture to module (#116195) 2024-04-25 22:00:07 -05:00
test_circular_imports.py Add empty line after module docstring (2) [other] (#112738) 2024-03-08 19:16:38 +01:00
test_config.py Add debug mode to catch unsafe thread operations using core helpers (#115390) 2024-04-24 03:36:05 +02:00
test_config_entries.py Always reload after a successful reauth flow (#116026) 2024-04-24 15:13:33 +02:00
test_const.py Improve loops and lists (#113269) 2024-03-14 10:22:20 +01:00
test_core.py Add thread safety checks to async_create_task (#116339) 2024-04-28 18:29:00 -04:00
test_data_entry_flow.py Ensure test async_create_task eager start behavior matches production (#115517) 2024-04-13 15:58:52 -05:00
test_exceptions.py Fix invalid tuple annotations (#116035) 2024-04-23 16:02:16 +02:00
test_loader.py Avoid falling back to event loop import on ModuleNotFound (#115404) 2024-04-11 16:32:47 -10:00
test_main.py Enable ruff RUF005 and fix occurrences (#113589) 2024-03-16 07:37:20 -10:00
test_requirements.py Make aiohttp_cors a top level import (#115563) 2024-04-15 21:06:59 +02:00
test_runner.py Bump ruff to 0.3.4 (#112690) 2024-03-26 00:02:16 +01:00
test_setup.py Enable Ruff B017 (#115335) 2024-04-15 22:25:09 +02:00
test_test_fixtures.py Add empty line after module docstring [helpers + other] (#112707) 2024-03-08 10:36:11 -05:00
typing.py Add test helper to remove device (#116234) 2024-04-28 18:50:15 +02:00