From: Michael R. Crusoe <crusoe@debian.org>
Subject: find the test tool directory more appropriately
Last-Update: 2026-10-08

galaxy_directory() goes up one level too high
--- python-galaxy-tool-util.orig/src/galaxy/tool_util/unittest_utils/__init__.py
+++ python-galaxy-tool-util/src/galaxy/tool_util/unittest_utils/__init__.py
@@ -9,7 +9,6 @@
 
 from galaxy.tool_util.parser.factory import get_tool_source
 from galaxy.tool_util.parser.interface import ToolSource
-from galaxy.util import galaxy_directory
 
 
 def mock_trans(has_user=True, is_admin=False):
@@ -34,7 +33,8 @@
 
 
 def functional_test_tool_directory() -> str:
-    return os.path.join(galaxy_directory(), "test/functional/tools")
+    root_dir = os.getcwd()
+    return os.path.join(root_dir, "test/functional/tools")
 
 
 def functional_test_tool_path(test_path: str) -> str:
--- python-galaxy-tool-util.orig/src/galaxy/tool_util/unittest_utils/parameters.py
+++ python-galaxy-tool-util/src/galaxy/tool_util/unittest_utils/parameters.py
@@ -10,7 +10,6 @@
     get_tool_source,
     ToolSource,
 )
-from galaxy.util import galaxy_directory
 from . import functional_test_tool_path
 
 
@@ -36,7 +35,8 @@
 
 
 def parameter_tool_source(basename: str) -> ToolSource:
-    parameters_dir = os.path.join(galaxy_directory(), "test/functional/tools/parameters")
+    root_dir = os.getcwd()
+    parameters_dir = os.path.join(root_dir, "test/functional/tools/parameters")
     if basename.endswith("_y"):
         yaml_name = basename[:-2]
         path = os.path.join(parameters_dir, f"{yaml_name}.yml")
