You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/02/25 08:09:09 UTC

[GitHub] [superset] villebro commented on a change in pull request #13330: fix: date picker support date unit with singular and plural

villebro commented on a change in pull request #13330:
URL: https://github.com/apache/superset/pull/13330#discussion_r582621521



##########
File path: tests/utils/date_parser_tests.py
##########
@@ -88,10 +88,18 @@ def test_get_since_until(self):
         expected = datetime(2016, 6, 7), datetime(2016, 11, 7)
         self.assertEqual(result, expected)
 
+        result = get_since_until("Last 5 month")
+        expected = datetime(2016, 6, 7), datetime(2016, 11, 7)
+        self.assertEqual(result, expected)
+

Review comment:
       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.

##########
File path: tests/utils/date_parser_tests.py
##########
@@ -88,10 +88,18 @@ def test_get_since_until(self):
         expected = datetime(2016, 6, 7), datetime(2016, 11, 7)
         self.assertEqual(result, expected)
 
+        result = get_since_until("Last 5 month")
+        expected = datetime(2016, 6, 7), datetime(2016, 11, 7)
+        self.assertEqual(result, expected)
+
         result = get_since_until("Next 5 months")
         expected = datetime(2016, 11, 7), datetime(2017, 4, 7)
         self.assertEqual(result, expected)
 
+        result = get_since_until("Next 5 month")
+        expected = datetime(2016, 11, 7), datetime(2017, 4, 7)
+        self.assertEqual(result, expected)
+

Review comment:
       Same here




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org