Skip to content

Commit 461632b

Browse files
committed
Test errors
1 parent f40f760 commit 461632b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/extensions/test_projection.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,18 @@ def test_summaries_adds_uri(self) -> None:
554554
self.assertNotIn(ProjectionExtension.get_schema_uri(), col.stac_extensions)
555555

556556

557+
def test_no_args_for_extension_class(item: Item) -> None:
558+
item.ext.add("proj")
559+
with pytest.raises(TypeError, match="takes 1 positional argument but 2 were given"):
560+
item.ext.proj.apply(32614) # type:ignore
561+
562+
563+
def test_set_both_code_and_epsg(item: Item) -> None:
564+
item.ext.add("proj")
565+
with pytest.raises(KeyError, match="Only one of the options"):
566+
item.ext.proj.apply(epsg=32614, code="EPSG:32614")
567+
568+
557569
@pytest.mark.vcr()
558570
def test_get_set_code(projection_landsat8_item: Item) -> None:
559571
proj_item = projection_landsat8_item

0 commit comments

Comments
 (0)