Skip to content

Commit 05ba950

Browse files
TST: Add test for UnstableRocketError in flight integration tests
1 parent 9971aa2 commit 05ba950

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/integration/test_flight.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import pytest
77

88
from rocketpy import Flight
9+
from rocketpy.exceptions import UnstableRocketError
910

1011
plt.rcParams.update({"figure.max_open_warning": 0})
1112

@@ -535,3 +536,15 @@ def test_freestream_speed_at_apogee(example_plain_env, calisto_robust):
535536
test_flight.free_stream_speed(test_flight.apogee_time), 0.0, atol=soft_atol
536537
)
537538
assert np.isclose(test_flight.apogee_freestream_speed, 0.0, atol=soft_atol)
539+
540+
541+
def test_unstable_flight_error(calisto, example_plain_env):
542+
with pytest.raises(UnstableRocketError):
543+
Flight(
544+
rocket=calisto,
545+
environment=example_plain_env,
546+
rail_length=5.2,
547+
inclination=85,
548+
heading=0,
549+
terminate_on_apogee=True,
550+
)

0 commit comments

Comments
 (0)