mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-08-14 00:47:52 +00:00
fix(tools): eager-import scan_chunks and knowledge_sql at package load
Every other built-in tool is imported here specifically to fire its @ToolRegistry.register() decorator at package-load time; these two were missing, so their test_registered tests only passed when some unrelated test (via agent_manager_routes.py, channels_cmd.py, or deep_research_setup_cmd.py) happened to import the module first in the same process. Under pytest-xdist that's worker-distribution dependent, so adding an unrelated test file could flip either test from pass to fail.
This commit is contained in:
@@ -142,4 +142,14 @@ try:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
try:
|
||||
import openjarvis.tools.scan_chunks # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
try:
|
||||
import openjarvis.tools.knowledge_sql # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
__all__ = ["BaseTool", "ToolExecutor", "ToolSpec"]
|
||||
|
||||
Reference in New Issue
Block a user