xchwan commented on code in PR #57463:
URL: https://github.com/apache/airflow/pull/57463#discussion_r2471658332
##########
airflow-core/tests/unit/models/test_dag.py:
##########
@@ -2870,7 +2871,12 @@ def
test_create_dagrun_disallow_manual_to_use_automated_run_id(run_id_type: DagR
dag = DAG(dag_id="test", start_date=DEFAULT_DATE, schedule="@daily")
run_id = DagRun.generate_run_id(run_type=run_id_type,
run_after=DEFAULT_DATE, logical_date=DEFAULT_DATE)
- with pytest.raises(ValueError) as ctx:
+ with pytest.raises(
+ ValueError,
+ match=re.escape(
+ f"A manual DAG run cannot use ID {run_id!r} since it is reserved
for {run_id_type.value} runs"
Review Comment:
!r means add qoute
if we write {run_id} => asset_triggered_2023-01-01T00
{run_id!r} => 'asset_triggered_2023-01-01T00'
I also learn it from this PR.
--
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]