Skip to content

Update test_eloc_attributes to use "close" comparisons - #3507

Merged
astrofrog merged 1 commit into
astropy:masterfrom
eteq:fix-eloc-test
Feb 16, 2015
Merged

astrofrog merged 1 commit into
astropy:masterfrom
eteq:fix-eloc-test

Conversation

@eteq

@eteq eteq commented Feb 16, 2015

Copy link
Copy Markdown
Member

This was prompted by #3496, where test_eloc_attributes is failing. This PR should close #3496 by switching to allclose comparisons. Also, there was a theory problem: the second set of asserts (for el2) was originally written assuming lat and lon should be different. But actually, only lat should be different because the WGS84 geoid is flattened only along the rotation axis, so longitudes aren't affected.

As suggested by @astrofrog, this also adds more explanation of exactly why these tests are the way they are in the form of comments.

The != comparison was leading to a false positive, but only on some
systems (i.e., astropy#3496, where it was failing because of lower precision)
@astrofrog

Copy link
Copy Markdown
Member

I can confirm that this fixes the issue on i386 👍

astrofrog added a commit that referenced this pull request Feb 16, 2015
Update test_eloc_attributes to use "close" comparisons
@astrofrog
astrofrog merged commit 738c03b into astropy:master Feb 16, 2015
astrofrog added a commit that referenced this pull request Feb 16, 2015
Update test_eloc_attributes to use "close" comparisons
@eteq
eteq deleted the fix-eloc-test branch February 17, 2015 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1.0rc1&2: test_eloc_attributes() fail on i386

2 participants