From c956b33e93816c9a6505ddfc3ef2e68e5046495d Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 6 Mar 2026 11:02:35 -1000 Subject: [PATCH] Add comment noting shift correctness is verified by integration test --- tests/unit_tests/core/test_entity_helpers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unit_tests/core/test_entity_helpers.py b/tests/unit_tests/core/test_entity_helpers.py index acf315c1b0..d6cbb8c6be 100644 --- a/tests/unit_tests/core/test_entity_helpers.py +++ b/tests/unit_tests/core/test_entity_helpers.py @@ -993,6 +993,12 @@ async def test_setup_entity_decorator_mode(setup_test_environment: list[str]) -> # Tests for finalize_entity_strings packing +# +# These tests verify that flags and string indices produce non-zero packed values +# and correct inline comments. The actual bit layout correctness (Python _*_SHIFT +# matching C++ ENTITY_FIELD_*_SHIFT) is verified end-to-end by the integration +# test test_host_mode_entity_fields, which compiles firmware and checks values +# via the native API. def _extract_packed_value(expressions: list[str]) -> int: