Skip to content

TST: added test for ea dtypes conversion to datetimetzdtype (GH37553) #43270

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 2 commits into from
Aug 31, 2021

Conversation

lorenzophys
Copy link
Contributor

Provided tests for type cast ExtensionDtypes -> DatetimeTZDtype.

Tests and linter pass locally.

@lorenzophys lorenzophys changed the title TST: added test for ea dtypes conversion to datetimetzdtype TST: added test for ea dtypes conversion to datetimetzdtype (GH37553) Aug 28, 2021
Copy link
Member

@mzeitlin11 mzeitlin11 left a comment

Choose a reason for hiding this comment

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

Thanks for the pr @lorenzophys! Just a small comment - right now the test uses only Series but is in frame/methods. I'd recommend either moving to series/methods or parametrizing using the frame_or_series fixture if that would make sense.

}
)

tm.assert_equal(result, expected)
Copy link
Member

Choose a reason for hiding this comment

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

If just comparing Series, could use tm.assert_series_equal. assert_equal is useful when doing something like parameterizing over DataFrame and Series (like with the frame_or_series fixture)

@mzeitlin11 mzeitlin11 added Dtype Conversions Unexpected or buggy dtype conversions ExtensionArray Extending pandas with custom dtypes or arrays. Testing pandas testing functions or related to the test suite Timezones Timezone data dtype labels Aug 28, 2021
@lorenzophys
Copy link
Contributor Author

Thank you for the review @mzeitlin11, the new location makes much more sense.

@jreback jreback added this to the 1.4 milestone Aug 31, 2021
@jreback jreback merged commit 2285eeb into pandas-dev:master Aug 31, 2021
@jreback
Copy link
Contributor

jreback commented Aug 31, 2021

thanks @lorenzophys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions ExtensionArray Extending pandas with custom dtypes or arrays. Testing pandas testing functions or related to the test suite Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Improve error message when casting ExtensionDtype to datetime
3 participants