From 3c759f72a86061ca8e57dd6d92c17c4738503c27 Mon Sep 17 00:00:00 2001 From: Gui-FernandesBR Date: Thu, 12 Sep 2024 02:16:11 -0300 Subject: [PATCH] TST: Add a test for sensors draw --- tests/integration/test_sensor.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/integration/test_sensor.py b/tests/integration/test_sensor.py index 2998b5f99..744a4178b 100644 --- a/tests/integration/test_sensor.py +++ b/tests/integration/test_sensor.py @@ -1,5 +1,6 @@ import json import os +from unittest.mock import patch import numpy as np import pytest @@ -86,6 +87,15 @@ def test_gnss_receiver(self): assert np.allclose(np.array(altitude), sim_altitude, atol=1e-12) +@pytest.mark.parametrize("plane", ["xz", "yz"]) +@patch("matplotlib.pyplot.show") +def test_draw( + mock_show, calisto_with_sensors, plane +): # pylint: disable=unused-argument + """Test the drawing of the sensors.""" + calisto_with_sensors.draw(plane=plane) + + def test_export_all_sensors_data(flight_calisto_with_sensors): """Test the export of sensor data.