Skip to content

Commit

Permalink
Adding no branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwaroquiers committed Mar 12, 2024
1 parent 76c071f commit 695a96e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/turbomoleio/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ def compare_differences(actual, desired, rtol=1e-7, atol=0, current_level=None):
)
return differences
except ValueError as err:
if "setting an array element with a sequence." in str(err):
if "setting an array element with a sequence." in str(err): # pragma: no branch
pass

if isinstance(desired, (list, tuple)):
Expand Down
6 changes: 6 additions & 0 deletions tests/test_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,12 @@ def test_compare_differences(self):
assert len(diffs) == 1
assert diffs[0][1].startswith(f">>>{STRINGS_DIFFER}<<<")

diffs = compare_differences("samestring", "samestring")
assert len(diffs) == 0

diffs = compare_differences([1, 2, 3], [1, 2, [3, 4]])
assert len(diffs) == 1
assert diffs[0][1].startswith(f">>>{ARRAYS_DIFFER}<<<")

diffs = compare_differences([1, 2, [4, 5]], [1, 2, [4, 5]])
assert len(diffs) == 0

0 comments on commit 695a96e

Please sign in to comment.