Hi. How to test the Prefect 2 task that uses `get_...
# ask-community
v
Hi. How to test the Prefect 2 task that uses
get_run_logger
? When I try to use task.fn it fails with no task or flow context.
1
j
Copy code
from prefect.logging.loggers import disable_run_logger

with disable_run_logger():
    task.fn()
upvote 2
🙏 2
v
Oh, interesting
v
Thanks!