Skip to content

Commit

Permalink
Update test to cover possible errors
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Oct 23, 2024
1 parent f88ae8c commit 4cf9782
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gwcs/tests/test_wcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,12 @@ def test_grid_from_compound_bounding_box():

assert np.all(grid == grid_truth)

# Capture errors
with pytest.raises(ValueError, match=r"Cannot use selector with a non-CompoundBoundingBox"):
grid_from_bounding_box(model.bounding_box[(300,)], selector=(300,))
with pytest.raises(ValueError, match=r"selector must be set when bounding_box is a CompoundBoundingBox"):
grid_from_bounding_box(model.bounding_box)


def test_wcs_from_points():
np.random.seed(0)
Expand Down

0 comments on commit 4cf9782

Please sign in to comment.