diff --git a/tests/unit_tests/core/test_config.py b/tests/unit_tests/core/test_config.py index e520db9e33..4c543bff9c 100644 --- a/tests/unit_tests/core/test_config.py +++ b/tests/unit_tests/core/test_config.py @@ -384,6 +384,8 @@ def test_preload_core_config_basic(setup_core: Path) -> None: assert platform == "esp32" assert KEY_CORE in CORE.data assert CONF_BUILD_PATH in config[CONF_ESPHOME] + # Verify default build path is "build/" + assert config[CONF_ESPHOME][CONF_BUILD_PATH].endswith("build/test_device") def test_preload_core_config_with_build_path(setup_core: Path) -> None: @@ -418,6 +420,8 @@ def test_preload_core_config_env_build_path(setup_core: Path) -> None: assert CONF_BUILD_PATH in config[CONF_ESPHOME] assert "test_device" in config[CONF_ESPHOME][CONF_BUILD_PATH] + # Verify it uses the env var path with device name appended + assert config[CONF_ESPHOME][CONF_BUILD_PATH].endswith("/env/build/test_device") assert platform == "rp2040"