Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Jul 3, 2024
1 parent e61f2e8 commit 135f47f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/tool_util/verify/asserts/hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tool_util/verify/test_asserts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 135f47f

Please sign in to comment.