1010plt .rcParams .update ({"figure.max_open_warning" : 0 })
1111
1212
13+ @pytest .mark .parametrize (
14+ "flight_fixture" , ["flight_calisto_robust" , "flight_calisto_robust_solid_eom" ]
15+ )
1316@patch ("matplotlib.pyplot.show" )
1417# pylint: disable=unused-argument
15- def test_all_info (mock_show , flight_calisto_robust ):
18+ def test_all_info (mock_show , request , flight_fixture ):
1619 """Test that the flight class is working as intended. This basically calls
1720 the all_info() method and checks if it returns None. It is not testing if
1821 the values are correct, but whether the method is working without errors.
@@ -21,11 +24,13 @@ def test_all_info(mock_show, flight_calisto_robust):
2124 ----------
2225 mock_show : unittest.mock.MagicMock
2326 Mock object to replace matplotlib.pyplot.show
24- flight_calisto_robust : rocketpy.Flight
25- Flight object to be tested. See the conftest.py file for more info
26- regarding this pytest fixture.
27+ request : _pytest.fixtures.FixtureRequest
28+ Request object to access the fixture dynamically.
29+ flight_fixture : str
30+ Name of the flight fixture to be tested.
2731 """
28- assert flight_calisto_robust .all_info () is None
32+ flight = request .getfixturevalue (flight_fixture )
33+ assert flight .all_info () is None
2934
3035
3136@pytest .mark .slow
0 commit comments