mirror of
https://github.com/esphome/esphome.git
synced 2026-08-24 15:16:20 +00:00
Cover the testing-mode flash-ld OSError guard
This commit is contained in:
@@ -346,6 +346,20 @@ def test_generate_ld_scripts_testing_mode(tmp_path: Path) -> None:
|
||||
assert "len = 0x2000000" in patched
|
||||
|
||||
|
||||
def test_generate_ld_scripts_testing_mode_missing_flash_ld_raises(
|
||||
tmp_path: Path,
|
||||
) -> None:
|
||||
"""A missing flash ld in testing mode names the file and the fix."""
|
||||
paths = _make_framework(tmp_path)
|
||||
CORE.testing_mode = True
|
||||
result = MagicMock(returncode=0, stdout=_COMMON_LD_H_OUTPUT, stderr="")
|
||||
with (
|
||||
patch.object(arduino8266.subprocess, "run", return_value=result),
|
||||
pytest.raises(EsphomeError, match="Could not read .*clean-all"),
|
||||
):
|
||||
_run_generate_ld_scripts(paths)
|
||||
|
||||
|
||||
def test_build_config_nonosdk_precedence() -> None:
|
||||
"""With two SDK knobs set (a pathological config), ties break
|
||||
deterministically by table order."""
|
||||
|
||||
Reference in New Issue
Block a user