Retry MD5 mismatches, log probe misses, and document the data timeout limitation

This commit is contained in:
J. Nick Koston
2026-08-12 20:15:16 -05:00
parent d5a19064ba
commit f3a464b367
2 changed files with 23 additions and 3 deletions
+6
View File
@@ -274,6 +274,12 @@ def test_check_error_unexpected_response() -> None:
espota2.check_error([0x7F], [espota2.RESPONSE_OK, espota2.RESPONSE_AUTH_OK])
def test_check_error_md5_mismatch_is_retryable() -> None:
"""Test check_error raises the retryable OTANetworkError for an MD5 mismatch."""
with pytest.raises(espota2.OTANetworkError, match="MD5 code mismatch"):
espota2.check_error([espota2.RESPONSE_ERROR_MD5_MISMATCH], None)
def test_check_error_empty_data() -> None:
"""Test check_error raises the retryable OTANetworkError when the device closes the connection."""
with pytest.raises(