multimeric commented on issue #58893:
URL: https://github.com/apache/airflow/issues/58893#issuecomment-3673976185
Thanks, that makes sense. I wonder how useful "Example 1: Testing using
``TaskInstance.run()``" is, considering these limitations. It might be tempting
to people like me to use that approach because it doesn't appear to need a dag
at all, but then it doesn't generalise. I think the above example would be
super useful in the documentation to help out taskflow users.
I also wonder if airflow would benefit from a testing utility that creates
the transient DAG, DagRun, and pulls out the result without the boilerplate,
e.g.
```python
@task
def add_numbers(a: int, b: int):
return a + b
result: Any = run_xcom_task(add_numbers(1, 2))
```
--
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]