kaxil commented on code in PR #44203:
URL: https://github.com/apache/airflow/pull/44203#discussion_r1850818216
##########
task_sdk/tests/execution_time/test_task_runner.py:
##########
@@ -73,3 +74,15 @@ def test_parse(test_dags_dir: Path):
assert ti.task.dag
assert isinstance(ti.task, BaseOperator)
assert isinstance(ti.task.dag, DAG)
+
+
+def test_run_basic(test_dags_dir: Path):
+ """Test running a basic task."""
+ what = StartupDetails(
+ ti=TaskInstance(id=uuid7(), task_id="hello", dag_id="super_basic_run",
run_id="c", try_number=1),
+ file=str(test_dags_dir / "super_basic_run.py"),
+ requests_fd=0,
+ )
+
+ ti = parse(what)
+ run(ti, log=mock.MagicMock())
Review Comment:
This is verified in `test_run_simple_dag`:
https://github.com/apache/airflow/blob/760f079ce47dde4ea5c8557444a1c17205f10667/task_sdk/tests/execution_time/test_supervisor.py#L220-L227
We can't verify it in `task_sdk/tests/execution_time/test_task_runner.py`
since the `run` method currently doesn't use `log` kw
--
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]