houqp commented on a change in pull request #12530:
URL: https://github.com/apache/airflow/pull/12530#discussion_r530029641
##########
File path: tests/serialization/test_dag_serialization.py
##########
@@ -448,6 +447,12 @@ def test_deserialization_start_date(self, dag_start_date,
task_start_date, expec
simple_task = dag.task_dict["simple_task"]
self.assertEqual(simple_task.start_date, expected_task_start_date)
+ def test_deserialization_with_dag_context(self):
+ with DAG(dag_id='simple_dag', start_date=datetime(2019, 8, 1,
tzinfo=timezone.utc)) as dag:
Review comment:
your suggestion is still valid, calling serialization within the with
block means the dummy task will be created with a DAG pushed to the top of dag
context. it covers the same edge case, it's just not how some of our DAGs are
written :)
----------------------------------------------------------------
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]