EV-52 review round 2: test row for Solar's late try cleared on leave
Test only. Kills a mutant that drops the _late clear in SolarWriter._leave(), which no row covered. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -651,6 +651,23 @@ for shape in ("solar", "off", "user"):
|
||||
f"logged later when the same value comes from another source",
|
||||
go(stale(shape)) == [])
|
||||
|
||||
|
||||
async def t23l():
|
||||
"""Review round 2: Solar's refused try is history once Solar is left;
|
||||
a later read-back of that value logs nothing."""
|
||||
w = carmode.SolarWriter()
|
||||
drv, tr = Drv(ok=False), tracker()
|
||||
w.engaged = True
|
||||
n0 = LOG.mark()
|
||||
await w._write(drv, 16.0, 0.0, 100.0, tr)
|
||||
w._leave()
|
||||
w._adopt(16.0)
|
||||
return [m for _lv, m, _x in LOG.rec[n0:] if m.startswith(SETP)]
|
||||
|
||||
|
||||
check("T23 (review round 2, N2) [solar leave]: a refused Solar try is not "
|
||||
"logged after Solar is left: 0 lines", go(t23l()) == [])
|
||||
|
||||
# T33: shutdown, the charger refuses all 3 release tries.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user