Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
roger-teoh authored and zebengberg committed Dec 12, 2024
1 parent 7f5084b commit 3c5d47b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/test_flight.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ def _check_rocd(_fl: Flight, nominal_rocd: float = constants.nominal_rocd) -> np

# Takes less than 10 minutes to descent to next recorded altitude (Nominal ROCD = 2500 ft/min)
index_sep = np.argwhere(fl13["time"] == pd.to_datetime("2000-01-01 00:50:00"))[0][0]
np.testing.assert_array_almost_equal(fl13.altitude_ft[: index_sep + 1], 30000.0, decimal=0)
np.testing.assert_array_almost_equal(fl13.altitude_ft[: index_sep], 30000.0, decimal=0)
assert _check_rocd(fl13)

# SCENARIO 5: If shallow descent (-250 < rocd < 0 ft/min), then assume descent in last step.
Expand All @@ -501,7 +501,7 @@ def _check_rocd(_fl: Flight, nominal_rocd: float = constants.nominal_rocd) -> np
altitude=units.ft_to_m(alt_ft),
)
fl14 = fl_alt.resample_and_fill("1min")
np.testing.assert_array_almost_equal(fl14.altitude_ft[:-6], 31000.0, decimal=0)
np.testing.assert_array_almost_equal(fl14.altitude_ft[:5], 31000.0, decimal=0)
np.testing.assert_array_almost_equal(fl14.altitude_ft[-6:], 30000.0, decimal=0)
assert _check_rocd(fl14)

Expand Down

0 comments on commit 3c5d47b

Please sign in to comment.