-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fix and tests for issue #10154 inconsistent behavior with invalid dates #10520
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
…Not all tests pass there are other issues.
@@ -4461,6 +4461,23 @@ def test_second(self): | |||
self.assertIsInstance(r2, Float64Index) | |||
tm.assert_index_equal(r1, r2) | |||
|
|||
class TestDaysInMonth(tm.TestCase): | |||
def test_day_not_in_month_coerce_true_NaT(self): | |||
self.assertTrue(isnull(to_datetime('2015-02-29', coerce=True))) |
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.
add the issue number as a comment
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.
pls add a blank line in between functions
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.
Added comments and blank lines. Should I open new issues for these test cases that do not pass?
self.assertTrue(isnull(to_datetime('2015-02-29', format="%Y-%m-%d", coerce=True)))
self.assertTrue(isnull(to_datetime('2015-04-31', format="%Y-%m-%d", coerce=True)))
merged via 5a76b44 thanks! |
closes #10154
This addresses the original issue and another discovered with the test cases.
Please review the tests to be sure you agree with the assertions.