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

Add test for NaN when comparing angles #15

Merged
merged 3 commits into from Oct 4, 2018
Merged

Add test for NaN when comparing angles #15

merged 3 commits into from Oct 4, 2018

Conversation

timj
Copy link
Member

@timj timj commented Oct 3, 2018

Otherwise Angle(NaN) was comparing favorably with any non-NaN
angle.

Copy link
Contributor

@r-owen r-owen left a comment

Choose a reason for hiding this comment

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

Looks good. One small requested addition to the unit test.

ang0 = float("NaN")*lsst.geom.degrees
ang1 = 1.*lsst.geom.degrees
with self.assertRaises(AssertionError):
self.assertAnglesAlmostEqual(ang0, ang1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please also test with the arguments swapped

@timj timj merged commit 569485f into master Oct 4, 2018
@timj timj deleted the tickets/DM-16018 branch October 4, 2018 02:37
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.

None yet

2 participants