Fazil Topal
02/14/2026, 11:50 AMRuntimeError: Flow run cannot be suspended: Cannot suspend flows without a deployment.
meanwhile i was actually doing this for my end2end tests:
import asyncio
import pytest
from prefect.testing.utilities import prefect_test_harness
from xflow.deploy import deploy_workflows, deploy_automations
@pytest.fixture(autouse=True, scope="session")
def prefect_db():
"""Enable Prefect test harness for end2end tests."""
with prefect_test_harness():
yield
@pytest.fixture(autouse=True, scope="session")
def deployments(prefect_db):
"""Deploy all flows using deploy.py."""
asyncio.run(deploy_workflows())
asyncio.run(deploy_automations())
yield