hass-core/tests/components/zha
J. Nick Koston 475c20d529
Always do thread safety check when writing state (#118886)
* Always do thread safety check when writing state

Refactor the 3 most common places where the thread safety check
for the event loop to be inline to make the check fast enough
that we can keep it long term. While code review catches most
of the thread safety issues in core, some of them still make
it through, and new ones keep getting added. Its not possible
to catch them all with manual code review, so its worth the
tiny overhead to check each time.

Previously the check was limited to custom components
because they were the most common source of thread
safety issues.

* Always do thread safety check when writing state

Refactor the 3 most common places where the thread safety check
for the event loop to be inline to make the check fast enough
that we can keep it long term. While code review catches most
of the thread safety issues in core, some of them still make
it through, and new ones keep getting added. Its not possible
to catch them all with manual code review, so its worth the
tiny overhead to check each time.

Previously the check was limited to custom components
because they were the most common source of thread
safety issues.

* async_fire is more common than expected with ccs

* fix mock

* fix hass mocking
2024-06-05 23:41:55 -04:00
..
__init__.py
common.py
conftest.py Add type hints for FixtureRequest in tests (#118779) 2024-06-04 10:37:54 +02:00
data.py
test_alarm_control_panel.py
test_api.py
test_backup.py Bump ZHA dependencies (#118658) 2024-06-02 16:55:48 -04:00
test_base.py
test_binary_sensor.py
test_button.py
test_climate.py
test_cluster_handlers.py Always do thread safety check when writing state (#118886) 2024-06-05 23:41:55 -04:00
test_config_flow.py
test_cover.py
test_device.py Add type hints for FixtureRequest in tests (#118779) 2024-06-04 10:37:54 +02:00
test_device_action.py
test_device_tracker.py
test_device_trigger.py
test_diagnostics.py
test_discover.py
test_fan.py
test_gateway.py
test_helpers.py
test_init.py Add LogCaptureFixture type hints in tests (#118372) 2024-05-29 14:10:00 +02:00
test_light.py
test_lock.py
test_logbook.py
test_number.py
test_radio_manager.py
test_registries.py
test_repairs.py
test_select.py Improve type hints in tests (q-z) (#118381) 2024-05-30 08:48:02 +02:00
test_sensor.py Improve type hints in tests (q-z) (#118381) 2024-05-30 08:48:02 +02:00
test_silabs_multiprotocol.py
test_siren.py
test_switch.py
test_update.py
test_websocket_api.py Improve type hints in tests (q-z) (#118381) 2024-05-30 08:48:02 +02:00
zha_devices_list.py