suii2210 commented on issue #58893:
URL: https://github.com/apache/airflow/issues/58893#issuecomment-3598787287

   Hello,
   I can work on improving the docs for this.
   I noticed the same confusion with the dag.test() snippet and how it behaves 
differently in pytest. So my idea is to add proper pytest examples - one where 
we run the operator using TaskInstance.run() and another using 
dag.create_dagrun() and then running the TI from that.
   
   I’ll add both examples to the unit-testing section in the docs and also 
include a small working test file so contributors can copy it directly. Once I 
have a draft ready, I’ll open a PR so the team can review it. Let me know if 
there's anything specific you’d like me to include.


-- 
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]

Reply via email to