Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: fix unit conversion #174

Merged
merged 2 commits into from
Mar 22, 2023
Merged

MAINT: fix unit conversion #174

merged 2 commits into from
Mar 22, 2023

Conversation

homosapien-lcy
Copy link
Contributor

The original unit conversion done in propagate_data_changes (scimath.units.quantity) can cause conversion error. This PR adds a fix and test for that. closes issue #171

@@ -197,6 +197,15 @@ def test_propagation(self):
self.assertAlmostEqual(30., q1.data, 1,
"Propagation test expected data 30, got %s" % str(q1.data))

def test_propagation2(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: let's use a better test method name here. How about something like test_propagation_to_imperial?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, just changed

Copy link
Member

@mdickinson mdickinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, modulo one nitpick about a test method name.

@homosapien-lcy homosapien-lcy merged commit 49468e0 into main Mar 22, 2023
@dpinte dpinte mentioned this pull request Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants