Skip to content

Commit 6dc5616

Browse files
committed
FIX: test equality of sorted list of hash values
The `helpers.hash_value` function does not guarantee order when giving the hashes of files in a directory, so this commit takes that into account by sorting the output of the `hash_value` calls before comparing.
1 parent c9c967e commit 6dc5616

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pydra/engine/tests/test_helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ def test_hash_value_dir(tmpdir):
135135
with open(file_2, "w") as f:
136136
f.write("hi")
137137

138-
assert hash_value(tmpdir, tp=Directory) == hash_value([file_1, file_2], tp=File)
138+
assert sorted(hash_value(tmpdir, tp=Directory)) == sorted(
139+
hash_value([file_1, file_2], tp=File)
140+
)
139141
assert hash_value(tmpdir, tp=Directory) == helpers_file.hash_dir(tmpdir)
140142

141143

0 commit comments

Comments
 (0)