From cc43c50eef66dbfe63f0e7e14e136066d9a54317 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 1 Jun 2023 12:51:18 +0200 Subject: [PATCH] Fix test search for mulled container hashes Fixes ``` FAILED test/unit/tool_util/mulled/test_get_tests.py::test_hashed_test_search - AssertionError: assert ['bamtools --help'] == ['bamtools --help', 'samtools --help'] Right contains one more item: 'samtools --help' Full diff: - ['bamtools --help', 'samtools --help'] + ['bamtools --help'] ``` (again). The test broke with the addition of `osx-64/samtools-1.3.1-h0840685_11.tar.bz2` 4 days ago. --- lib/galaxy/tool_util/deps/mulled/get_tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tool_util/deps/mulled/get_tests.py b/lib/galaxy/tool_util/deps/mulled/get_tests.py index 76576520438..847f50d255c 100644 --- a/lib/galaxy/tool_util/deps/mulled/get_tests.py +++ b/lib/galaxy/tool_util/deps/mulled/get_tests.py @@ -297,7 +297,8 @@ def hashed_test_search( r.raise_for_status() p = "-".join(package) for line in r.text.split("\n"): - if p in line: + # include only linux-64 builds since that is hardcoded in get_anaconda_url and the only target for container builds + if p in line and "linux-64" in line: build = line.split(p)[1].split(".tar.bz2")[0] if build == "": containers.append(f"{package[0]}:{package[1]}")