-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: datetime64 - Timestamp incorrectly raising TypeError #28286
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
other = ts + td | ||
|
||
assert other - ts == td | ||
assert other.to_pydatetime() - ts == td |
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.
Is anything above this line not tested elsewhere? Just was a little counter intuitive to read as I thought this PR was only about datetime64 obects
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.
trying to follow the pattern in these tests of testing all datetime-like scalars in the same place
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.
Makes sense
other = ts + td | ||
|
||
assert other - ts == td | ||
assert other.to_pydatetime() - ts == td |
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.
Makes sense
|
||
assert other - ts == td | ||
assert other.to_pydatetime() - ts == td | ||
if tz_naive_fixture is None: |
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.
What should happen if this is not None? Should there be a test for this?
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.
should raise bc of tzawareness compat, will update test to include that
Travis has been done for a few hours, no idea why it’s stuck on yellow |
lgtm. can you rebase and push again. |
rebased+green |
Thanks @jbrockmendel |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff