amoghrajesh commented on code in PR #44203:
URL: https://github.com/apache/airflow/pull/44203#discussion_r1850211793
##########
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:
Will be good if we can assert the log produced too just to check if the run
is working as expected. Otherwise LGTM
--
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]