18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 19:44:58 +01:00
Files
maszyna/tests/scenarios/run.py
jerrrrycho 75c8ac6149 test(scenarios): the coupler control case checks that the units coupled
The checks of en57_2000_automatic_coupler_couples said only that nothing
collided nor derailed, so the case passed just as well with the units
buffering, bouncing apart or never meeting.

The simulator writes nothing to the log when automatic couplers catch,
but the black box of the run (physicslog/<scenery>_<date>.blackbox, written
along with the physicslogs the runner turns on) gets a coupling record with
the two vehicles. run.py reads the vehicle and the coupling records of it
and gets a check on them, couples: the two named vehicles couple after the
start and are still coupled at the end. It fails when the black box has no
coupling of that pair, when they came apart again, when they were coupled
from the start, and when the run left no black box.

The case names the vehicles that meet: the last car of the standing unit
and the first of the rolling one. The black box is moved to out/<case>/
with the other files of the run.
2026-11-11 21:25:19 +01:00

36 KiB