diff --git a/tests/test_aux_power.py b/tests/test_aux_power.py new file mode 100644 index 0000000..d73bc3f --- /dev/null +++ b/tests/test_aux_power.py @@ -0,0 +1,18 @@ +from reactor_sim.reactor import Reactor +from reactor_sim.commands import ReactorCommand + + +def test_pump_stays_off_without_aux_power(): + reactor = Reactor.default() + state = reactor.initial_state() + reactor.shutdown = False + reactor.primary_pump_active = True + reactor.primary_pump_units = [True, False] + reactor.secondary_pump_active = False + reactor.generator_auto = False + reactor.turbine_unit_active = [False, False, False] + + reactor.step(state, dt=1.0, command=ReactorCommand(primary_pumps={1: True})) + + assert state.primary_loop.mass_flow_rate == 0.0 + assert state.primary_pumps[0].status in {"OFF", "STOPPING"}