Skip to content

Commit 2793a62

Browse files
TST: Add test for UnstableRocketError in flight integration tests
1 parent 2f0d7be commit 2793a62

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

@@ -521,3 +522,15 @@ def test_freestream_speed_at_apogee(example_plain_env, calisto_robust):
521522
test_flight.free_stream_speed(test_flight.apogee_time), 0.0, atol=soft_atol
522523
)
523524
assert np.isclose(test_flight.apogee_freestream_speed, 0.0, atol=soft_atol)
525+
526+
527+
def test_unstable_flight_error(calisto, example_plain_env):
528+
with pytest.raises(UnstableRocketError):
529+
Flight(
530+
rocket=calisto,
531+
environment=example_plain_env,
532+
rail_length=5.2,
533+
inclination=85,
534+
heading=0,
535+
terminate_on_apogee=True,
536+
)

0 commit comments

Comments
 (0)