Skip to content

Commit

Permalink
TST: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
MateusStano committed Nov 29, 2023
1 parent dcdd6bd commit b27edc3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,16 @@ def test_fin_flutter_analysis(mock_show, flight):
)
== None
)


def test_get_instance_attributes(flight_calisto_robust):
"""Tests if get_instance_attributes returns the expected results for a
robust flight object."""

attributes = utilities.get_instance_attributes(flight_calisto_robust)
for key, value in attributes.items():
attr = getattr(flight_calisto_robust, key)
if isinstance(attr, np.ndarray):
assert np.allclose(attr, value)
else:
assert attr == value

0 comments on commit b27edc3

Please sign in to comment.