Skip to content

Commit

Permalink
expand geo_to_h3shape test
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfriend committed Nov 10, 2023
1 parent 5f37f43 commit 1fea86c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/polyfill/test_h3.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,15 @@ def test_poly_opens_loop():


def test_geo_to_h3shape():
loops = [lnglat_open(), lnglat_closed()]
mocks = map(get_mocked, loops)
h3shapes = map(h3.geo_to_h3shape, mocks)
h3shapes = [
h3.geo_to_h3shape(get_mocked(lnglat_open())),
h3.geo_to_h3shape(get_mocked(lnglat_closed())),
h3.H3Poly(latlng_open()),
h3.H3Poly(latlng_closed()),
]

for s in h3shapes:
assert len(h3.h3shape_to_cells(s, 8)) == 48

expected = {
'type': 'Polygon',
Expand Down

0 comments on commit 1fea86c

Please sign in to comment.