Skip to content

Commit 85f873f

Browse files
committed
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()`.
1 parent 7500f4f commit 85f873f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/galaxy/tools/stock.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# Set GALAXY_INCLUDES_ROOT from tool shed to point this at a Galaxy root
88
# (once we are running the tool shed from packages not rooted with Galaxy).
99
import galaxy.tools
10+
from galaxy.tool_util.loader_directory import looks_like_a_tool_xml
1011
from galaxy.tool_util.parser import get_tool_source
1112
from galaxy.util import galaxy_directory
1213
from galaxy.util.resources import files
@@ -26,7 +27,7 @@ def stock_tool_sources():
2627

2728

2829
def _walk_directory_for_tools(path):
29-
if path.is_file() and path.name.endswith(".xml"):
30+
if path.is_file() and not path.name.endswith("tool_conf.xml") and looks_like_a_tool_xml(path):
3031
yield path
3132
elif path.is_dir():
3233
for directory in path.iterdir():

0 commit comments

Comments
 (0)