Learn about writing tests for Prefect flows and tasks.
prefect_test_harness
as a fixture in your unit testing framework. For example, when using pytest
:
@task
or @flow
, use .fn
to call the wrapped function directly:
RuntimeError
raised from a missing flow context.