Skip to content

BUG: Fix assert_equal on time-like objects #10096

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

Merged
merged 1 commit into from
Nov 27, 2017

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Nov 27, 2017

Also does some cleanup on the float assert_equal to make it look more similar.

Fixes #10081, which was a regression in 1.13

Also does some cleanup on the float assert_equal to make it look more similar.

Fixes numpy#10081
# If one of desired/actual is not finite, handle it specially here:
# check that both are nan if any is a nan, and test for equality
# otherwise
if not (gisfinite(desired) and gisfinite(actual)):
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think there was any reason to special-case the infinite cases - those work fine under normal ==

@eric-wieser eric-wieser force-pushed the fix-assert_equal-datetime branch from 4c123e5 to f107d38 Compare November 27, 2017 07:19
@eric-wieser
Copy link
Member Author

eric-wieser commented Nov 27, 2017

Test failures are garbage, and look like a pretty serious design flaw in travis/appveyor - if you push to the branch while it's running tests, it merges a different commit for each subjob, rather than resolving the branch head and using the same commit SHA1 in each one...

@charris
Copy link
Member

charris commented Nov 27, 2017

LGTM, thanks Eric.

@charris
Copy link
Member

charris commented Nov 27, 2017

Backport in #10103. Not quite straightforward as the utils.py file has moved among other things.

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.

2 participants