()
| 179 | |
| 180 | @python_version_request |
| 181 | def test_interpreter() -> None: |
| 182 | NUM_EXECUTION = 3 |
| 183 | order = get_order() |
| 184 | simulator = get_simulator(order) |
| 185 | interpreter_action = CategoricalActionInterpreter(values=NUM_EXECUTION) |
| 186 | |
| 187 | NUM_STEPS = 7 |
| 188 | state = simulator.get_state() |
| 189 | position_history = [] |
| 190 | for i in range(NUM_STEPS): |
| 191 | simulator.step(interpreter_action(state, 1)) |
| 192 | state = simulator.get_state() |
| 193 | position_history.append(state.position) |
| 194 | |
| 195 | assert position_history[-1] == max(TOTAL_POSITION - TOTAL_POSITION / NUM_EXECUTION * (i + 1), 0.0) |
nothing calls this directly
no test coverage detected