-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
fix: date picker support date unit with singular and plural #13330
Conversation
tests/utils/date_parser_tests.py
Outdated
result = get_since_until("Last 5 month") | ||
expected = datetime(2016, 6, 7), datetime(2016, 11, 7) | ||
self.assertEqual(result, expected) | ||
|
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.
Could we make this UT test for the correct singular case "Last 1 month"? Having the "Last 5 month" test is probably a good additional test, but less important IMO.
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.
thanks for reminding me. Because there is Last 5 months
UT case now, so added a Last 5 month
(This syntax is wrong ). singular and plural time units are now supported. Although sometimes the syntax is incorrect.
tests/utils/date_parser_tests.py
Outdated
result = get_since_until("Next 5 month") | ||
expected = datetime(2016, 11, 7), datetime(2017, 4, 7) | ||
self.assertEqual(result, expected) | ||
|
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.
Same here
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.
got it
Codecov Report
@@ Coverage Diff @@
## master #13330 +/- ##
==========================================
+ Coverage 77.15% 80.84% +3.68%
==========================================
Files 866 300 -566
Lines 45005 24420 -20585
Branches 5357 0 -5357
==========================================
- Hits 34723 19742 -14981
+ Misses 10159 4678 -5481
+ Partials 123 0 -123
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…3330) * fix: date picker support date unit with singular and plural * fix grammar
SUMMARY
fix date picker does not support singular data unit
closed: #13264
TEST PLAN
Added UT for this case
ADDITIONAL INFORMATION