ramziash commented on code in PR #74583:
URL: https://github.com/apache/airflow/pull/74583#discussion_r4693044571


##########
task-sdk/tests/task_sdk/definitions/timetables/test_assets.py:
##########
@@ -50,6 +50,23 @@ def 
test_partitioned_timetable_preserves_positional_mapper_arguments(batch_asset
     assert timetable.batch_asset_events is batch_asset_events
 
 
+def test_partitioned_timetable_refire_policy_defaults_to_none():
+    assert PartitionedAssetTimetable(assets=Asset("test")).refire_policy is 
None
+
+
[email protected]("refire_policy", ["rerun", "newrun"])
+def test_partitioned_timetable_refire_policy_is_settable(refire_policy):
+    timetable = PartitionedAssetTimetable(assets=Asset("test"), 
refire_policy=refire_policy)
+    assert timetable.refire_policy == refire_policy
+
+
[email protected]("refire_policy", ["Rerun", "rerun ", "always", ""])
+def test_partitioned_timetable_rejects_invalid_refire_policy(refire_policy):

Review Comment:
   Added test_partitioned_timetable_accepts_valid_refire_policy, which runs 
validate() on None, "rerun" and "newrun". Also added 
test_dag_validate_checks_refire_policy, which checks one valid and one invalid 
value through Dag.validate(), following 
test_compound_asset_condition_requires_batching.



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