Two starting-point files for new hardware tests. Leading underscore
in the filenames keeps pytest from collecting them.
- _test_case_template.py — for ALM_Node-touching MUM tests.
Three flavors with full SETUP / PROCEDURE / ASSERT / TEARDOWN
section markers:
A) minimal: relies on the autouse _reset_to_off (LED OFF
baseline) — no per-test setup/teardown
B) with isolation: try/finally pattern for tests that mutate
persistent ECU state (e.g. ConfigFrame)
C) single-signal probe: fio.read_signal one-shot
Inline comments explain pytest fundamentals (fixture, scope,
autouse, yield, rp), the four-phase pattern, and the
must/must-not contract.
- _test_case_template_psu_lin.py — for tests that drive the PSU
AND observe the LIN bus (over/undervoltage tolerance, brown-out,
supply transients). Three flavors:
A) overvoltage: apply OV via apply_voltage_and_settle, single
status read after validation hold, assert OverVoltage
B) undervoltage: symmetric for UV
C) parametrized voltage sweep
Documents the three-layer safety guarantee (session
safe_off_on_close / autouse _park_at_nominal / per-test
try/finally) and the rule that tests never call set_output(False)
or close() — the session fixture owns the PSU lifecycle.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>