Skip to content

Commit

Permalink
Add test for unlikely error case
Browse files Browse the repository at this point in the history
Trying to resolve code coverage complaints...
  • Loading branch information
trey-stafford committed Oct 30, 2024
1 parent 2adc38d commit 9df3ec7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion icepyx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@


from _icepyx_version import version as __version__

from icepyx.core.query import GenQuery, Query
from icepyx.core.read import Read
from icepyx.core.variables import Variables
Expand Down
8 changes: 8 additions & 0 deletions icepyx/tests/unit/test_spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import pytest
from shapely.geometry import Polygon

import icepyx
import icepyx.core.spatial as spat

# ######### "Bounding Box" input tests ################################################################################
Expand Down Expand Up @@ -528,6 +529,13 @@ def test_bbox_fmt():
assert obs == exp


def test_fmt_for_cmr_fails_unknown_extent_type():
bbox = spat.Spatial([-55, 68, -48, 71])
bbox._ext_type = "Unknown_user_override"
with pytest.raises(icepyx.core.exceptions.ExhaustiveTypeGuardException):
bbox.fmt_for_CMR()


@pytest.fixture
def poly():
coords = [
Expand Down

0 comments on commit 9df3ec7

Please sign in to comment.