You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/06/21 11:45:37 UTC

[GitHub] [airflow] penggongkui commented on a change in pull request #16557: TaskGroup add default_args

penggongkui commented on a change in pull request #16557:
URL: https://github.com/apache/airflow/pull/16557#discussion_r655305332



##########
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:
       make sense, added some test case




-- 
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:
users@infra.apache.org