Taragolis commented on code in PR #34744:
URL: https://github.com/apache/airflow/pull/34744#discussion_r1345453063


##########
tests/models/test_dag.py:
##########
@@ -94,10 +95,17 @@
 from tests.test_utils.timetables import cron_timetable, delta_timetable
 
 TEST_DATE = datetime_tz(2015, 1, 2, 0, 0)
-
 repo_root = Path(__file__).parents[2]
 
 
+def convert_dt(tz: Timezone, dt, dst_rule):
+    """Converts a datetime in the current timezone"""
+    try:
+        return tz.convert(dt=dt, dst_rule=dst_rule)
+    except TypeError:  # Pendulum 3 Timezone doesn't have dst_rule
+        return tz.convert(dt=dt)

Review Comment:
   If I do not miss anything then `dst_rule` used for compatibility with Python 
< 3.6
   https://pendulum.eustace.io/docs/#using-the-timezone-library-directly
   
   I think it use `fold` argument from datetime.datetime in current 
implementation: 
https://github.com/sdispater/pendulum/blob/18f9c0ec365cb5ddf5f90722535a46ecfea7bd9b/src/pendulum/tz/timezone.py#L107-L114
   
   I could change a bit test helper



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

Reply via email to