|
4 | 4 | import pytest
|
5 | 5 |
|
6 | 6 | from rocketpy import NoseCone, Rocket, SolidMotor, Function
|
7 |
| -from rocketpy.motors.motor import EmptyMotor |
| 7 | +from rocketpy.motors.motor import Motor, EmptyMotor |
8 | 8 |
|
9 | 9 |
|
10 | 10 | @patch("matplotlib.pyplot.show")
|
@@ -500,15 +500,14 @@ def test_add_motor(calisto_motorless, cesaroni_m1670):
|
500 | 500 | cesaroni_m1670 : rocketpy.SolidMotor
|
501 | 501 | Cesaroni M1670 motor
|
502 | 502 | """
|
| 503 | + |
503 | 504 | assert isinstance(calisto_motorless.motor, EmptyMotor)
|
504 | 505 | center_of_mass_motorless = calisto_motorless.center_of_mass
|
505 | 506 | calisto_motorless.add_motor(cesaroni_m1670, 0)
|
506 | 507 |
|
507 |
| - assert calisto_motorless.motor is not None |
| 508 | + assert isinstance(calisto_motorless.motor, Motor) |
508 | 509 | center_of_mass_with_motor = calisto_motorless.center_of_mass
|
509 | 510 |
|
510 |
| - print(center_of_mass_motorless) |
511 |
| - print(center_of_mass_with_motor) |
512 | 511 | assert center_of_mass_motorless is not center_of_mass_with_motor
|
513 | 512 |
|
514 | 513 |
|
@@ -537,6 +536,7 @@ def test_set_rail_button(calisto):
|
537 | 536 | def test_evaluate_total_mass(calisto_motorless):
|
538 | 537 | """Tests the evaluate_total_mass method of the Rocket class.
|
539 | 538 | Both with respect to return instances and expected behaviour.
|
| 539 | +
|
540 | 540 | Parameters
|
541 | 541 | ----------
|
542 | 542 | calisto_motorless : Rocket instance
|
|
0 commit comments