Skip to content

Commit

Permalink
fixed error messages to use enums
Browse files Browse the repository at this point in the history
  • Loading branch information
ESadek-MO committed Nov 24, 2023
1 parent 0a08219 commit bac084c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,21 @@ def test_invalid_args():
with pytest.raises(ValueError) as excinfo:
_ = regrid_unstructured_to_unstructured(node_src, tgt, method="conservative")
expected_message = (
"Conservative regridding requires a source cube located on "
"Method.CONSERVATIVE regridding requires a source cube located on "
"the face of a cube, target cube had the node location."
)
assert expected_message in str(excinfo.value)
with pytest.raises(ValueError) as excinfo:
_ = regrid_unstructured_to_unstructured(edge_src, tgt, method="bilinear")
expected_message = (
"bilinear regridding requires a source cube with a node "
"Method.BILINEAR regridding requires a source cube with a node "
"or face location, target cube had the edge location."
)
assert expected_message in str(excinfo.value)
with pytest.raises(ValueError) as excinfo:
_ = regrid_unstructured_to_unstructured(edge_src, tgt, method="nearest")
expected_message = (
"nearest regridding requires a source cube with a node "
"Method.NEAREST regridding requires a source cube with a node "
"or face location, target cube had the edge location."
)
assert expected_message in str(excinfo.value)
Expand Down

0 comments on commit bac084c

Please sign in to comment.