mirror of
https://github.com/esphome/esphome.git
synced 2026-09-30 16:30:22 +00:00
Make timing total the sum of its named windows
This commit is contained in:
@@ -392,9 +392,9 @@ def test_perform_ota_no_auth(
|
||||
|
||||
mock_socket.recv.side_effect = recv_responses
|
||||
|
||||
# Distinct window lengths pin each duration to its label; exactly the 7
|
||||
# Distinct window lengths pin each duration to its label; exactly the 6
|
||||
# expected perf_counter calls, so an unaccounted timing window raises
|
||||
timings = [0.0, 2.0, 10.0, 15.0, 20.0, 27.0, 30.0]
|
||||
timings = [0.0, 2.0, 10.0, 15.0, 20.0, 27.0]
|
||||
with (
|
||||
patch("time.perf_counter", side_effect=timings),
|
||||
caplog.at_level(logging.INFO),
|
||||
@@ -413,7 +413,7 @@ def test_perform_ota_no_auth(
|
||||
# pin each duration to its label
|
||||
assert "Preparing for upload took 2.00 seconds" in caplog.text
|
||||
assert (
|
||||
"Update took 30.00 seconds (prepare 2.00, upload 5.00, commit 7.00)"
|
||||
"Update took 14.00 seconds (prepare 2.00, upload 5.00, commit 7.00)"
|
||||
in caplog.text
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user