diff --git a/tests/fixtures/environment/environment_fixtures.py b/tests/fixtures/environment/environment_fixtures.py index 91b185a35..2679e3ca3 100644 --- a/tests/fixtures/environment/environment_fixtures.py +++ b/tests/fixtures/environment/environment_fixtures.py @@ -99,7 +99,7 @@ def example_euroc_env(example_date_naive): return euroc_env -@pytest.fixture +@pytest.fixture(scope="session") def env_analysis(): """Environment Analysis class with hardcoded parameters diff --git a/tests/integration/environment/test_environment_analysis.py b/tests/integration/environment/test_environment_analysis.py index 2b12a2057..6e3a76aef 100644 --- a/tests/integration/environment/test_environment_analysis.py +++ b/tests/integration/environment/test_environment_analysis.py @@ -3,14 +3,12 @@ from unittest.mock import patch import matplotlib as plt -import pytest from rocketpy import Environment plt.rcParams.update({"figure.max_open_warning": 0}) -@pytest.mark.slow @patch("matplotlib.pyplot.show") def test_all_info(mock_show, env_analysis): # pylint: disable=unused-argument """Test the EnvironmentAnalysis.all_info() method, which already invokes @@ -32,7 +30,6 @@ def test_all_info(mock_show, env_analysis): # pylint: disable=unused-argument os.remove("wind_rose.gif") # remove the files created by the method -@pytest.mark.slow @patch("matplotlib.pyplot.show") def test_exports(mock_show, env_analysis): # pylint: disable=unused-argument """Check the export methods of the EnvironmentAnalysis class. It @@ -59,7 +56,6 @@ def test_exports(mock_show, env_analysis): # pylint: disable=unused-argument os.remove("export_env_analysis.json") -@pytest.mark.slow @patch("matplotlib.pyplot.show") def test_create_environment_object(mock_show, env_analysis): # pylint: disable=unused-argument assert isinstance(env_analysis.create_environment_object(), Environment) diff --git a/tests/unit/environment/test_environment_analysis.py b/tests/unit/environment/test_environment_analysis.py index a9f9a945e..dda5df31b 100644 --- a/tests/unit/environment/test_environment_analysis.py +++ b/tests/unit/environment/test_environment_analysis.py @@ -48,7 +48,6 @@ def test_missing_timezonefinder_defaults_to_utc( assert analysis.end_date.tzinfo is not None -@pytest.mark.slow @patch("matplotlib.pyplot.show") def test_distribution_plots(mock_show, env_analysis): # pylint: disable=unused-argument """Tests the distribution plots method of the EnvironmentAnalysis class. It @@ -79,7 +78,6 @@ def test_distribution_plots(mock_show, env_analysis): # pylint: disable=unused- ) -@pytest.mark.slow @patch("matplotlib.pyplot.show") def test_average_plots(mock_show, env_analysis): # pylint: disable=unused-argument """Tests the average plots method of the EnvironmentAnalysis class. It @@ -105,7 +103,6 @@ def test_average_plots(mock_show, env_analysis): # pylint: disable=unused-argum assert env_analysis.plots.average_wind_rose_specific_hour(12) is None -@pytest.mark.slow @patch("matplotlib.pyplot.show") def test_profile_plots(mock_show, env_analysis): # pylint: disable=unused-argument """Check the profile plots method of the EnvironmentAnalysis class. It @@ -147,7 +144,6 @@ def test_profile_plots(mock_show, env_analysis): # pylint: disable=unused-argum ) -@pytest.mark.slow def test_values(env_analysis): """Check the numeric properties of the EnvironmentAnalysis class. It computes a few values and compares them to the expected values. Not all the values are @@ -171,7 +167,6 @@ def test_values(env_analysis): assert pytest.approx(env_analysis.std_pressure_at_30000ft, 1e-6) == 38.48947 -@pytest.mark.slow @patch("matplotlib.pyplot.show") def test_animation_plots(mock_show, env_analysis): # pylint: disable=unused-argument """Check the animation plots method of the EnvironmentAnalysis class. It @@ -202,7 +197,6 @@ def test_animation_plots(mock_show, env_analysis): # pylint: disable=unused-arg os.remove("wind_rose.gif") # remove the files created by the method -@pytest.mark.slow def test_pressure_level_wind_profile_uses_velocity_components(env_analysis): """Regression for PR #1041: the redundant per-level ``wind_heading`` and ``wind_direction`` functions were removed from the pressure-level data.