Deceivious
05/12/2023, 9:57 AMtesting .
@flow
def flow():
#SOME STUFF HERE
normal_function()
#SOME OTHER STUFF HERE
def normal_function():
return some_task()
@task
def some_task():
return TrueDeceivious
05/12/2023, 9:57 AMTrue .Deceivious
05/12/2023, 9:59 AMsome_task is a prefect task and needs to be flow context.
I am testing normal_function so my codes cannot invoke .fn method of prefect task to run the function directly.Abhishek Mitra
05/12/2023, 12:50 PM.fn for some_task()?
change your normal_function:
def normal_function():
return some_task.fn()Deceivious
05/12/2023, 1:23 PMsome_task will no longer be a task Even outside the test.