Skip to content

Commit

Permalink
Fix test_stock.py unit test
Browse files Browse the repository at this point in the history
We'd treat macros.xml and sample_tool_conf.xml as potential tools and
fail `assert tool_source.parse_id()`.
  • Loading branch information
mvdbeek committed Oct 21, 2024
1 parent 9f3ed27 commit dd38500
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/galaxy/tools/stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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():
Expand Down

0 comments on commit dd38500

Please sign in to comment.