From 9d8362738f7186c2e49bdb5653d2b82745d8dc4c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 8 Aug 2026 23:09:13 -0500 Subject: [PATCH] Use the canonical board id and the sibling test conventions --- .../ble_device_base/config/ln882h_tracker.yaml | 2 +- .../component_tests/ble_device_base/test_hub_binding.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/component_tests/ble_device_base/config/ln882h_tracker.yaml b/tests/component_tests/ble_device_base/config/ln882h_tracker.yaml index a2001faa10..891d65ecf6 100644 --- a/tests/component_tests/ble_device_base/config/ln882h_tracker.yaml +++ b/tests/component_tests/ble_device_base/config/ln882h_tracker.yaml @@ -2,6 +2,6 @@ esphome: name: slotcount-ln882h-tracker ln882x: - board: generic-ln882hki + board: generic-ln882h ln882h_ble_tracker: diff --git a/tests/component_tests/ble_device_base/test_hub_binding.py b/tests/component_tests/ble_device_base/test_hub_binding.py index 63f263803a..4f9aa56ccd 100644 --- a/tests/component_tests/ble_device_base/test_hub_binding.py +++ b/tests/component_tests/ble_device_base/test_hub_binding.py @@ -1,6 +1,6 @@ """Tests for the BLE hub provider registry and the missing-hub diagnostics.""" -from collections.abc import Generator +from collections.abc import Callable, Generator from importlib import import_module from pathlib import Path @@ -214,8 +214,8 @@ def test_add_service_uuid_dispatches_by_width(monkeypatch: pytest.MonkeyPatch) - ], ) def test_every_tracker_emits_its_alias_define( - generate_main, - component_config_path, + generate_main: Callable[[str | Path], str], + component_config_path: Callable[[str], Path], config_name: str, define: str, ) -> None: @@ -225,6 +225,5 @@ def test_every_tracker_emits_its_alias_define( mirror, are compile-enforced: a missing arm fails every consumer build on that platform and clang-tidy compiles each arm's static_assert).""" generate_main(component_config_path(config_name)) - from tests.component_tests.helpers import get_define_value - assert get_define_value(define) is not None, f"{define} not emitted by codegen" + assert define in {d.name for d in CORE.defines}, f"{define} not emitted by codegen"