Skip to content

MAINT: fix unit conversion#174

Merged
homosapien-lcy merged 2 commits into
mainfrom
fix_unit_conversion
Mar 22, 2023
Merged

MAINT: fix unit conversion#174
homosapien-lcy merged 2 commits into
mainfrom
fix_unit_conversion

Conversation

@homosapien-lcy
Copy link
Copy Markdown
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

Comment thread scimath/units/tests/test_units.py Outdated
self.assertAlmostEqual(30., q1.data, 1,
"Propagation test expected data 30, got %s" % str(q1.data))

def test_propagation2(self):
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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