kaxil commented on code in PR #66102:
URL: https://github.com/apache/airflow/pull/66102#discussion_r3171540058


##########
task-sdk/tests/task_sdk/definitions/test_timetables.py:
##########
@@ -18,26 +18,29 @@
 
 import pytest
 
-from airflow.sdk.exceptions import NodeNotFound, TaskNotFound
+from airflow.sdk.definitions.timetables._cron import CRON_PRESETS, CronMixin
+from airflow.sdk.exceptions import AirflowTimetableInvalid
 
+SAMPLE_TZ = "UTC"
 
-def test_node_not_found_is_subclass_of_task_not_found():
-    assert issubclass(NodeNotFound, TaskNotFound)
 
[email protected](("preset", "expected"), CRON_PRESETS.items())
+def test_cron_preset_resolved(preset, expected):
+    cm = CronMixin(expression=preset, timezone=SAMPLE_TZ)
+    assert cm.expression == expected

Review Comment:
   Parametrising from `CRON_PRESETS.items()` makes this tautological. If 
someone breaks the dict (typo in a cron expression), the test still passes 
because both sides come from the same source. A static expected-value table 
would catch that.



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