From 673ac84b8b0a3673fdebce26f2560b96840573c8 Mon Sep 17 00:00:00 2001 From: Gui-FernandesBR Date: Sat, 13 Jul 2024 03:18:35 -0300 Subject: [PATCH] TST: fix problematic `test_stochastic_solid_motor_create_object_with_impulse` test --- tests/unit/test_monte_carlo.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/unit/test_monte_carlo.py b/tests/unit/test_monte_carlo.py index 0e1ad22cc..f168b8bfe 100644 --- a/tests/unit/test_monte_carlo.py +++ b/tests/unit/test_monte_carlo.py @@ -34,13 +34,12 @@ def test_stochastic_solid_motor_create_object_with_impulse(stochastic_solid_moto stochastic_solid_motor : StochasticSolidMotor The stochastic solid motor object, this is a pytest fixture. """ - total_impulse = [] - for _ in range(20): - random_motor = stochastic_solid_motor.create_object() - total_impulse.append(random_motor.total_impulse) + total_impulse = [ + stochastic_solid_motor.create_object().total_impulse for _ in range(200) + ] assert np.isclose(np.mean(total_impulse), 6500, rtol=0.3) - assert np.isclose(np.std(total_impulse), 1000, rtol=0.3) + assert np.isclose(np.std(total_impulse), 1000, rtol=0.4) def test_stochastic_calisto_create_object_with_static_margin(stochastic_calisto):