-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Dataset.copy() to preserve encoding #1590
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
Conversation
Ready for merge if there's no objections |
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crusaderky - pytest has nice introspection for this sort of thing. https://docs.pytest.org/en/latest/assert.html#making-use-of-context-sensitive-comparisons
git diff upstream/master | flake8 --diff
whats-new.rst
for all changes andapi.rst
for new API