diff --git a/goodwe_controller/test_ev13.py b/goodwe_controller/test_ev13.py index b0c57d6..98d2b29 100644 --- a/goodwe_controller/test_ev13.py +++ b/goodwe_controller/test_ev13.py @@ -1051,9 +1051,10 @@ for _s, _r in steady({5: dict(a=10.0)}, end=14, **zero): check("P4 [live]: from the send to the move the refusal is an open window " "dated TS (armed_at still None)", all(w == TS and a is None for s, w, a in _mid if s < 11)) +_last = _mid[-1] if _mid else None check(f"P4 [live]: the window arms dated TS when it runs out, and the moved " - f"read-back disarms it in the same sample ({_dates}, {_mid[-1]})", - _dates == [TS] and _tr.armed_at is None and not _tr.stuck_now + f"read-back disarms it in the same sample ({_dates}, {_last})", + _last is not None and _dates == [TS] and _tr.armed_at is None and not _tr.stuck_now and pend(_tr) is None) tr, first, ever = play(steady({5: dict(a=10.0)}, **zero), "ring", pre=zero) check(f"P4 [ring]: the read-back moved inside the window BEFORE the refusal "