chore: 纳入本地 Dify 1.19.0 源码及品牌与免登改动
演示目录只保留可重建的源码。运行密钥、数据卷、依赖和带口令的本地配置不进入仓库。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
60158935f4
commit
6519682885
15831 files changed
+3063428
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import gc
|
||||
import os
|
||||
from collections.abc import Iterator
|
||||
|
||||
import pytest
|
||||
|
||||
from core.app.workflow.file_runtime import create_dify_workflow_file_runtime
|
||||
from graphon.file.runtime import use_workflow_file_runtime
|
||||
|
||||
# Tests select an explicit deployment event transport.
|
||||
os.environ.setdefault("HUMAN_INPUT_IM_EVENT_TRANSPORT_MODE", "WEBHOOK")
|
||||
|
||||
|
||||
def pytest_collection_finish(session: pytest.Session) -> None:
|
||||
"""Move everything loaded during collection out of the garbage collector's reach.
|
||||
|
||||
Collection imports the whole application, so every automatic full collection afterwards
|
||||
rescanned those long-lived objects and stalled whichever test triggered it. Objects created
|
||||
by tests themselves are still collected normally.
|
||||
"""
|
||||
gc.collect()
|
||||
gc.freeze()
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _bind_workflow_file_runtime() -> Iterator[None]:
|
||||
with use_workflow_file_runtime(create_dify_workflow_file_runtime()):
|
||||
yield
|
||||
Reference in new issue
Block a user