TST: Add unit tests for evaluate_reduced_mass and remove TODO#1051
Open
Gui-FernandesBR wants to merge 1 commit into
Open
TST: Add unit tests for evaluate_reduced_mass and remove TODO#1051Gui-FernandesBR wants to merge 1 commit into
Gui-FernandesBR wants to merge 1 commit into
Conversation
Removes the TODO comment in rocketpy/rocket/rocket.py asking for tests for reduced_mass values. Adds test_evaluate_reduced_mass_without_motor, test_evaluate_reduced_mass_empty_motor, and test_evaluate_reduced_mass_with_motor to tests/unit/rocket/test_rocket.py.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1051 +/- ##
===========================================
- Coverage 81.75% 81.75% -0.01%
===========================================
Files 119 119
Lines 15192 15201 +9
===========================================
+ Hits 12420 12427 +7
- Misses 2772 2774 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
MateusStano
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
This PR resolves a TODO comment in
rocketpy/rocket/rocket.py:615:# TODO: add tests for reduced_mass values.Modifications Checklist
# TODO: add tests for reduced_mass valuescomment inrocketpy/rocket/rocket.py.tests/unit/rocket/test_rocket.pyto coverevaluate_reduced_mass()behavior:test_evaluate_reduced_mass_without_motor: Verifies that callingevaluate_reduced_mass()when the motor isNonereturnsFalse.test_evaluate_reduced_mass_empty_motor: Verifies that callingevaluate_reduced_mass()when the motor isEmptyMotorreturns a Function that evaluates to 0.test_evaluate_reduced_mass_with_motor: Verifies that callingevaluate_reduced_mass()when a motor is associated returns a Function calculating the correct reduced mass.Expected Outcome
evaluate_reduced_mass()is fully covered by unit tests.