-
Notifications
You must be signed in to change notification settings - Fork 218
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
Date format support #234
Date format support #234
Conversation
1 similar 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.
Please fix the changes requested.
@@ -745,3 +745,13 @@ def test_named_tuples_validate_as_tuples(): | |||
Schema((int, int))(t) | |||
Schema(NT(int, int))(nt) | |||
Schema(NT(int, int))(t) | |||
|
|||
|
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.
Can you add a test case where DateInvalid
is catched ?
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.
This test is already written in the 760 line
try: | ||
datetime.datetime.strptime(v, self.format).date() | ||
if len(v) != len(self.FORMAT_DESCRIPTION): | ||
raise ValueError |
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.
ValueError doesn't provide sufficient information. Use DateInvalid with different string input.
This looks fine. Please squash your commits. |
Done! |
No description provided.