Skip to content

Commit 5cdb31a

Browse files
committed
Changes according to comments
Made some changes according to the comments made in the PR.
1 parent 6c7a28f commit 5cdb31a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

rocketpy/mathutils/function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
carefully as it may impact all the rest of the project.
55
"""
66
import warnings
7-
from inspect import signature
87
from collections.abc import Iterable
8+
from inspect import signature
99
from pathlib import Path
1010

1111
import matplotlib.pyplot as plt

tests/test_rocket.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pytest
55

66
from rocketpy import NoseCone, Rocket, SolidMotor, Function
7-
from rocketpy.motors.motor import EmptyMotor
7+
from rocketpy.motors.motor import Motor, EmptyMotor
88

99

1010
@patch("matplotlib.pyplot.show")
@@ -500,15 +500,14 @@ def test_add_motor(calisto_motorless, cesaroni_m1670):
500500
cesaroni_m1670 : rocketpy.SolidMotor
501501
Cesaroni M1670 motor
502502
"""
503+
503504
assert isinstance(calisto_motorless.motor, EmptyMotor)
504505
center_of_mass_motorless = calisto_motorless.center_of_mass
505506
calisto_motorless.add_motor(cesaroni_m1670, 0)
506507

507-
assert calisto_motorless.motor is not None
508+
assert isinstance(calisto_motorless.motor, Motor)
508509
center_of_mass_with_motor = calisto_motorless.center_of_mass
509510

510-
print(center_of_mass_motorless)
511-
print(center_of_mass_with_motor)
512511
assert center_of_mass_motorless is not center_of_mass_with_motor
513512

514513

@@ -537,6 +536,7 @@ def test_set_rail_button(calisto):
537536
def test_evaluate_total_mass(calisto_motorless):
538537
"""Tests the evaluate_total_mass method of the Rocket class.
539538
Both with respect to return instances and expected behaviour.
539+
540540
Parameters
541541
----------
542542
calisto_motorless : Rocket instance

0 commit comments

Comments
 (0)