Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ndcube/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@
assert test_value == expected_value
except ValueError as err: # noqa: PERF203
if multi_element_msg in err.args[0]:
assert np.allclose(test_value, expected_value)
if test_value.dtype.kind in ('S', 'U'):
# If the values are strings, we can compare them as arrays.
assert np.array_equal(test_value, expected_value)

Check warning on line 117 in ndcube/tests/helpers.py

View check run for this annotation

Codecov / codecov/patch

ndcube/tests/helpers.py#L117

Added line #L117 was not covered by tests
else:
assert np.allclose(test_value, expected_value)
for key in test_input.axes.keys():
assert all(test_input.axes[key] == expected_output.axes[key])
else:
Expand Down