Pete Fein02/22/2020, 3:42 PM
Jeff Brainerd02/22/2020, 4:06 PM
. Then we examine the resulting state of the flow run to verify tasks succeeded or skipped appropriately. We also implemented a dry run mode that avoids running the guts of long running tasks.
directly with the appropriate kwargs - you can unit test your task trigger / state change logic by creating a
with any collection of upstream state objects (https://docs.prefect.io/api/latest/engine/task_runner.html) - you can unit test your full flow logic by providing a (possibly incomplete) dictionary of
pairs and providing it to
and inspecting the outputs as @Jeff Brainerd mentions above - you can unit test your schedules by testing your flow’s
class directly If there is another type of testing that you had in mind let me know and I can tell you how we would address it; this is also a good reminder that we should write a tutorial on testing flows!
Stanley Yeh04/11/2020, 7:44 AM
return a + 5
assert 5 == boring_func(0) # would not work. "ValueError: Could not infer an active Flow context"
Wish this is mentioned somewhere in the docs.
assert 5 == boring_func.run(0) # this would work