uranusjr commented on a change in pull request #19965:
URL: https://github.com/apache/airflow/pull/19965#discussion_r764975554
##########
File path: tests/models/test_baseoperator.py
##########
@@ -600,3 +607,74 @@ class ConcreteSubclassOp(InitSubclassOp,
class_arg=class_arg):
assert task_copy._class_arg == class_arg
assert task_copy.context_arg == context
+
+
+def test_task_mapping_with_dag():
+ with DAG("test-dag", start_date=DEFAULT_DATE) as dag:
+ task1 = BaseOperator(task_id="op1")
+ literal = ['a', 'b', 'c']
+ mapped = MockOperator(task_id='task_2').map(arg2=literal)
+
+ finish = MockOperator(task_id="finish")
+
+ task1 >> mapped >> finish
+
+ assert task1.downstream_list == [mapped]
+ assert mapped in dag.tasks
+ # At parse time there should only be two tasks!
Review comment:
```suggestion
# At parse time there should only be three tasks!
```
--
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]