eladkal commented on a change in pull request #16557:
URL: https://github.com/apache/airflow/pull/16557#discussion_r655277260
##########
File path: tests/utils/test_task_group.py
##########
@@ -823,6 +823,23 @@ def section_2(value):
assert extract_node_id(task_group_to_dict(dag.task_group)) == node_ids
+def test_default_args():
+ """Testing TaskGroup with default_args"""
+
+ execution_date = pendulum.parse("20201109")
+ with DAG(
+ dag_id='example_task_group_default_args',
+ start_date=execution_date,
+ default_args={
+ "owner": "dag",
+ },
+ ):
+ with TaskGroup("group1", default_args={"owner": "group"}):
+ task_1 = DummyOperator(task_id='task_1')
+
+ assert task_1.owner == 'group'
Review comment:
i think it would be better to add additional test verifying that setting
a parameter on the task level overwrite the default args of the TaskGroup.
--
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:
[email protected]