From 7155776cfb4c5b9be7c6729d59dcf9209ca33441 Mon Sep 17 00:00:00 2001 From: snowman2 Date: Mon, 5 Sep 2022 22:13:20 -0500 Subject: [PATCH] TST: test_coordinate_operation_grids__alternative_grid_name - handle when PROJ 9.1 and local grid exists --- test/crs/test_crs.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/crs/test_crs.py b/test/crs/test_crs.py index d05d6fcde..0c3018e15 100644 --- a/test/crs/test_crs.py +++ b/test/crs/test_crs.py @@ -604,12 +604,14 @@ def test_coordinate_operation_grids__alternative_grid_name(): assert grid.direct_download is True assert grid.open_license is True assert grid.short_name == "ca_nrc_ntv1_can.tif" - if PROJ_GTE_91 and pyproj.network.is_network_enabled(): - assert grid.available is True - assert grid.full_name == "" - elif grids_available(grid.short_name): + if (PROJ_GTE_91 and grids_available(grid.short_name, check_network=False)) or ( + not PROJ_GTE_91 and grids_available(grid.short_name) + ): assert grid.available is True assert grid.full_name.endswith(grid.short_name) + elif PROJ_GTE_91 and pyproj.network.is_network_enabled(): + assert grid.available is True + assert grid.full_name == "" else: assert grid.available is False assert grid.full_name == ""