mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-22 16:06:50 +00:00
refactor(skills): Unified skill storage capability (#2613)
This commit is contained in:
@@ -68,6 +68,21 @@ def provisioner_module():
|
||||
# context should mark themselves ``@pytest.mark.no_auto_user``.
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _reset_skill_storage_singleton():
|
||||
"""Reset the SkillStorage singleton between tests to prevent cross-test contamination."""
|
||||
try:
|
||||
from deerflow.skills.storage import reset_skill_storage
|
||||
except ImportError:
|
||||
yield
|
||||
return
|
||||
reset_skill_storage()
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
reset_skill_storage()
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _auto_user_context(request):
|
||||
"""Inject a default ``test-user-autouse`` into the contextvar.
|
||||
|
||||
Reference in New Issue
Block a user