From aa20274e66da73f557d22dadc5cb7c4f550d8314 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 20 Oct 2024 18:18:51 -0400 Subject: [PATCH] Fix test_stock.py unit test We'd treat macros.xml and sample_tool_conf.xml as potential tools and fail `assert tool_source.parse_id()`. --- lib/galaxy/tools/stock.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tools/stock.py b/lib/galaxy/tools/stock.py index 1a86354f1370..eead325e644a 100644 --- a/lib/galaxy/tools/stock.py +++ b/lib/galaxy/tools/stock.py @@ -7,6 +7,7 @@ # Set GALAXY_INCLUDES_ROOT from tool shed to point this at a Galaxy root # (once we are running the tool shed from packages not rooted with Galaxy). import galaxy.tools +from galaxy.tool_util.loader_directory import looks_like_a_tool_xml from galaxy.tool_util.parser import get_tool_source from galaxy.util import galaxy_directory from galaxy.util.resources import files @@ -26,7 +27,7 @@ def stock_tool_sources(): def _walk_directory_for_tools(path): - if path.is_file() and path.name.endswith(".xml"): + if path.is_file() and not path.name.endswith("tool_conf.xml") and looks_like_a_tool_xml(path): yield path elif path.is_dir(): for directory in path.iterdir():