zhaoyongjie commented on code in PR #23685:
URL: https://github.com/apache/superset/pull/23685#discussion_r1174360417


##########
tests/unit_tests/utils/date_parser_tests.py:
##########
@@ -260,12 +264,30 @@ def test_datetime_eval() -> None:
     expected = datetime(2018, 9, 3, 0, 0, 0)
     assert result == expected
 
+    result = datetime_eval(
+        "holiday('Eid al-Fitr', datetime('2000-01-01T00:00:00'), 'SA')"
+    )
+    expected = datetime(2000, 1, 8, 0, 0, 0)
+    assert result == expected
+
     result = datetime_eval(
         "holiday('Boxing day', datetime('2018-01-01T00:00:00'), 'UK')"
     )
     expected = datetime(2018, 12, 26, 0, 0, 0)
     assert result == expected
 
+    result = datetime_eval(
+        "holiday('Juneteenth', datetime('2022-01-01T00:00:00'), 'US')"
+    )
+    expected = datetime(2022, 6, 19, 0, 0, 0)
+    assert result == expected
+
+    result = datetime_eval(
+        "holiday('Independence Day', datetime('2022-01-01T00:00:00'), 'US')"
+    )
+    expected = datetime(2022, 7, 4, 0, 0, 0)
+    assert result == expected
+

Review Comment:
   Hi there, the US holiday case was added to L273 so the duplicated test case 
is not necessary. Thanks for supporting more widely holiday types!



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to