Skip to content

Commit

Permalink
TST: fix problematic `test_stochastic_solid_motor_create_object_with_…
Browse files Browse the repository at this point in the history
…impulse` test
  • Loading branch information
Gui-FernandesBR committed Jul 14, 2024
1 parent f1a49b9 commit 673ac84
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/unit/test_monte_carlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 673ac84

Please sign in to comment.