potiuk commented on code in PR #44484: URL: https://github.com/apache/airflow/pull/44484#discussion_r1863875060
########## task_sdk/tests/defintions/test_dag.py: ########## @@ -417,3 +417,9 @@ def noop_pipeline(value): ... # Test that if arg is not passed it raises a type error as expected. with pytest.raises(TypeError): noop_pipeline() + + def test_create_dag_while_active_context(self): + """Test that we can safely create a DAG whilst a DAG is activated via ``with dag1:``.""" + with DAG(dag_id="simple_dag"): + DAG(dag_id="dag2") + # No asserts needed, it just needs to not fail Review Comment: sure . That works too -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org