mirror of
https://github.com/esphome/esphome.git
synced 2026-10-14 02:02:51 +00:00
Match the restore report as text; a Windows path is no regex
This commit is contained in:
@@ -470,9 +470,12 @@ def test_restore_finishes_after_any_failure(tmp_path: Path) -> None:
|
||||
|
||||
with (
|
||||
patch("esphome.yaml_edit.write_keeping_mode", side_effect=fail_first),
|
||||
pytest.raises(RestoreError, match=f"Could not restore {path}: odd"),
|
||||
pytest.raises(RestoreError) as info,
|
||||
):
|
||||
restore_files(originals)
|
||||
assert f"Could not restore {path}: odd" in str(
|
||||
info.value
|
||||
) # a Windows path is no regex
|
||||
assert "garage" in path.read_text() and other.read_text() == "x: 1\n"
|
||||
with (
|
||||
patch(
|
||||
|
||||
Reference in New Issue
Block a user