Skip to content

Commit

Permalink
add tests to construct an empty polygon from __geointerface__
Browse files Browse the repository at this point in the history
  • Loading branch information
cleder committed May 1, 2024
1 parent 38cf8a2 commit 9975d32
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_polygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ def test_from_dict_shell_only() -> None:
}


def test_from_dict_empty_coordinates() -> None:
polygon = geometry.Polygon._from_dict(
{
"type": "Polygon",
"bbox": (0.0, 0.0, 1.0, 1.0),
"coordinates": (),
},
)

assert polygon.is_empty


def test_from_dict_with_holes() -> None:
polygon = geometry.Polygon._from_dict(
{
Expand Down

0 comments on commit 9975d32

Please sign in to comment.