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

Dataset.copy() to preserve encoding #1590

Merged
merged 7 commits into from
Oct 8, 2017

Conversation

crusaderky
Copy link
Contributor

@crusaderky crusaderky commented Sep 24, 2017

  • Closes Dataset.copy() drops encoding #1586
  • Tests added / passed
  • Passes git diff upstream/master | flake8 --diff
  • Fully documented, including whats-new.rst for all changes and api.rst for new API

@crusaderky
Copy link
Contributor Author

Ready for merge if there's no objections

@jhamman
Copy link
Member

jhamman commented Sep 25, 2017

Pending the outcome of our conversation on #1586, this looks good to me.

@@ -1434,6 +1435,7 @@ def test_copy(self):

for copied in [data.copy(deep=False), copy(data)]:
self.assertDatasetIdentical(data, copied)
self.assertEqual(data.encoding, copied.encoding)
Copy link
Member

Choose a reason for hiding this comment

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

note on behalf of @MaximilianR -

this can just be assert data.encoding == copied.encoding

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't assertEqual produce better output in case of failure?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Pytest satisfies all your desires!

Copy link
Member

Choose a reason for hiding this comment

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

@shoyer shoyer merged commit 772f7e0 into pydata:master Oct 8, 2017
@crusaderky crusaderky deleted the dataset_copy_encoding branch October 9, 2017 20:55
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.

5 participants