potiuk commented on code in PR #44484: URL: https://github.com/apache/airflow/pull/44484#discussion_r1863815322
########## 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: Why? At some point we might add a rule "flag tests without asserts" if that will be added in Ruff - which might be actually a useful suggestion for a new rule for them..... -- 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