Janet Carson
10/30/2024, 6:57 PMfrom prefect import flow
from prefect.testing.utilities import prefect_test_harness
@flow
def my_favorite_flow():
return 42
def test_my_favorite_flow():
with prefect_test_harness():
# run the flow against a temporary testing database
assert my_favorite_flow() == 42
But... I'm in a virtual environment for my actual job, and my prefect profile includes this setting PREFECT_LOGGING_EXTRA_LOGGERS='jds' so I assume this is where the value of v in the stack trace below is coming from.Nate
10/30/2024, 7:02 PM» PREFECT_LOGGING_EXTRA_LOGGERS='jds' ipython
In [1]: from prefect.settings import Settings
In [2]: Settings().logging.extra_loggers
Out[2]: ['jds']
In [3]: !uv pip list | rg prefect
prefect 3.0.12.dev2+3.g9f2f47572d /Users/nate/github.com/prefecthq/prefect
Nate
10/30/2024, 7:02 PM» pip install git+<https://github.com/prefecthq/prefect.git>
and try again, does it work?Janet Carson
10/30/2024, 7:03 PMJanet Carson
10/30/2024, 7:04 PMNate
10/30/2024, 7:05 PMmain
if not in the most recent version on PyPI
but im thinking now it might have to do with temporary_settings
(used by test harness)Janet Carson
10/30/2024, 7:06 PMJeff Hale
10/31/2024, 1:24 PMJanet Carson
10/31/2024, 4:21 PM