Skip to content

Commit

Permalink
TST: unite gyro and accel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MateusStano committed Apr 2, 2024
1 parent 378bb54 commit d8440f2
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions tests/test_sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ def test_sensor_on_rocket(calisto_accel_gyro):
assert isinstance(sensors[1].position, Vector)


def test_ideal_accelerometer(flight_calisto_accel_gyro):
"""Test the ideal accelerometer.
def test_ideal_sensors(flight_calisto_accel_gyro):
"""Test the ideal sensors. All types of sensors are here to reduvce
testing time.
Parameters
----------
Expand All @@ -41,15 +42,6 @@ def test_ideal_accelerometer(flight_calisto_accel_gyro):
# tolerance is bounded to numerical errors in the transformation matrixes
assert np.allclose(a, sim_accel, atol=1e-2)


def test_ideal_gyroscope(flight_calisto_accel_gyro):
"""Test the ideal gyroscope.
Parameters
----------
flight_calisto_accel_gyro : Flight
Pytest fixture for the flight of the calisto rocket with an ideal accelerometer and a gyroscope.
"""
gyroscope = flight_calisto_accel_gyro.rocket.sensors[1].component
time, wx, wy, wz = zip(*gyroscope.measured_data)
wx = np.array(wx)
Expand Down

0 comments on commit d8440f2

Please sign in to comment.