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 Enable Ruff B905 (#114197) 2024-04-14 00:14:26 -05:00
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 Unignore Ruff PLR in tests (#114470) 2024-04-01 11:11:59 +02:00
test_api.py Ensure config entry operations are always holding the lock (#117214) 2024-05-12 08:20:08 +09:00
test_backup.py Bump ZHA dependencies (#118658) 2024-06-02 16:55:48 -04:00
test_base.py
test_binary_sensor.py Unignore Ruff PLR in tests (#114470) 2024-04-01 11:11:59 +02:00
test_button.py Use registry fixtures in tests (z) (#118300) 2024-05-28 18:25:49 +02:00
test_climate.py Enable Ruff rule PT007 (#113764) 2024-03-19 09:01:07 +01:00
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 Use is in ConfigEntryState enum comparison in tests (N-Z) (#114926) 2024-04-05 17:37:00 +02:00
test_cover.py Unignore Ruff PLR in tests (#114470) 2024-04-01 11:11:59 +02:00
test_device.py Add type hints for FixtureRequest in tests (#118779) 2024-06-04 10:37:54 +02:00
test_device_action.py Use registry fixtures in tests (z) (#118300) 2024-05-28 18:25:49 +02:00
test_device_tracker.py Unignore Ruff PLR in tests (#114470) 2024-04-01 11:11:59 +02:00
test_device_trigger.py Improve typing for calls fixture in tests (m-z) (#118350) 2024-05-29 09:30:41 +02:00
test_diagnostics.py Unignore Ruff PLR in tests (#114470) 2024-04-01 11:11:59 +02:00
test_discover.py Ensure config entry operations are always holding the lock (#117214) 2024-05-12 08:20:08 +09:00
test_fan.py Enable Ruff rule PT007 (#113764) 2024-03-19 09:01:07 +01:00
test_gateway.py Enable Ruff RET504 (#114528) 2024-04-06 11:07:37 +02:00
test_helpers.py Unignore Ruff PLR in tests (#114470) 2024-04-01 11:11:59 +02:00
test_init.py Add LogCaptureFixture type hints in tests (#118372) 2024-05-29 14:10:00 +02:00
test_light.py Use registry fixtures in tests (z) (#118300) 2024-05-28 18:25:49 +02:00
test_lock.py Unignore Ruff PLR in tests (#114470) 2024-04-01 11:11:59 +02:00
test_logbook.py Use registry fixtures in tests (z) (#118300) 2024-05-28 18:25:49 +02:00
test_number.py Use registry fixtures in tests (z) (#118300) 2024-05-28 18:25:49 +02:00
test_radio_manager.py Use is in ConfigEntryState enum comparison in tests (N-Z) (#114926) 2024-04-05 17:37:00 +02:00
test_registries.py Unignore Ruff PLR in tests (#114470) 2024-04-01 11:11:59 +02:00
test_repairs.py Use issue_registry fixture in component tests (#118041) 2024-05-24 15:54:20 +02:00
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 Add empty line after module docstring [tests t-z] (#112712) 2024-03-08 14:44:56 +01:00
test_siren.py Unignore Ruff PLR in tests (#114470) 2024-04-01 11:11:59 +02:00
test_switch.py Unignore Ruff PLR in tests (#114470) 2024-04-01 11:11:59 +02:00
test_update.py Enable Ruff RET504 (#114528) 2024-04-06 11:07:37 +02:00
test_websocket_api.py Improve type hints in tests (q-z) (#118381) 2024-05-30 08:48:02 +02:00
zha_devices_list.py Fix ZHA creating unnecessary "summ received" entity after upgrade (#109268) 2024-02-05 19:12:56 -05:00