Skip to content

Commit b75ad49

Browse files
authored
TST: test_coordinate_operation_grids__alternative_grid_name - handle when PROJ 9.1 and local grid exists (#1130)
1 parent 22cc5e0 commit b75ad49

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/crs/test_crs.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,12 +604,14 @@ def test_coordinate_operation_grids__alternative_grid_name():
604604
assert grid.direct_download is True
605605
assert grid.open_license is True
606606
assert grid.short_name == "ca_nrc_ntv1_can.tif"
607-
if PROJ_GTE_91 and pyproj.network.is_network_enabled():
608-
assert grid.available is True
609-
assert grid.full_name == ""
610-
elif grids_available(grid.short_name):
607+
if (PROJ_GTE_91 and grids_available(grid.short_name, check_network=False)) or (
608+
not PROJ_GTE_91 and grids_available(grid.short_name)
609+
):
611610
assert grid.available is True
612611
assert grid.full_name.endswith(grid.short_name)
612+
elif PROJ_GTE_91 and pyproj.network.is_network_enabled():
613+
assert grid.available is True
614+
assert grid.full_name == ""
613615
else:
614616
assert grid.available is False
615617
assert grid.full_name == ""

0 commit comments

Comments
 (0)