diff --git a/lib/galaxy/tool_util/verify/asserts/hdf5.py b/lib/galaxy/tool_util/verify/asserts/hdf5.py index e94c61c3af04..ddbbcdd35cda 100644 --- a/lib/galaxy/tool_util/verify/asserts/hdf5.py +++ b/lib/galaxy/tool_util/verify/asserts/hdf5.py @@ -21,7 +21,7 @@ def assert_has_h5_attribute(output_bytes: bytes, key: str, value: str) -> None: local_attrs = h5py.File(output_temp, "r").attrs assert ( key in local_attrs and str(local_attrs[key]) == value - ), f"Not a HDF5 file or H5 attributes do not match:\n\t{list(local_attrs.items())}\n\n\t({key} : {value})" + ), f"Not a HDF5 file or H5 attributes do not match:\n\t{[(key, str(value)) for key, value in local_attrs.items()]}\n\n\t({key} : {value})" # TODO the function actually queries groups. so the function and argument name are misleading diff --git a/test/unit/tool_util/verify/test_asserts.py b/test/unit/tool_util/verify/test_asserts.py index a7f419fa4a32..af357871ccad 100644 --- a/test/unit/tool_util/verify/test_asserts.py +++ b/test/unit/tool_util/verify/test_asserts.py @@ -1315,7 +1315,7 @@ def test_has_h5_attribute_failure(): """test has_attribute .. negative""" a = run_assertions(H5_HAS_ATTRIBUTE_NEGATIVE, H5BYTES) assert ( - "Not a HDF5 file or H5 attributes do not match:\n\t[('myfileattr', 'myfileattrvalue'), ('myfileattrint', 1)]\n\n\t(myfileattr : wrong)" + "Not a HDF5 file or H5 attributes do not match:\n\t[('myfileattr', 'myfileattrvalue'), ('myfileattrint', '1')]\n\n\t(myfileattr : wrong)" in a ) assert len(a) == 1