Skip to content

Commit

Permalink
more consise message, fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer committed Aug 14, 2024
1 parent 3c43df4 commit b8932dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/test_partitioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def test_labels_to_indices():
assert np.array_equal(indices[2], [3, 4])


def test_merge_partitions_empty_list()
pytest.raises(ValueError, message="Received list of partitions is empty, cannot be merged."):
def test_merge_partitions_empty_list():
pytest.raises(ValueError, message="Received empty partitions list, cannot be merged."):
xu.merge_partitions([])


Expand Down
2 changes: 1 addition & 1 deletion xugrid/ugrid/partitioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def merge_partitions(partitions, merge_ugrid_chunks: bool = True):
merged : UgridDataset
"""
if len(partitions) == 0:
raise ValueError("Received list of partitions is empty, cannot be merged.")
raise ValueError("Received empty partitions list, cannot be merged.")
types = {type(obj) for obj in partitions}
msg = "Expected UgridDataArray or UgridDataset, received: {}"
if len(types) > 1:
Expand Down

0 comments on commit b8932dd

Please sign in to comment.