Skip to content

Commit

Permalink
TST: handle empty full_name in test_coordinate_operation_grids__alter…
Browse files Browse the repository at this point in the history
…native_grid_name with PROJ 9.1+ (#1080)
  • Loading branch information
snowman2 committed May 18, 2022
1 parent 9003784 commit 21ccfc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/conftest.py
Expand Up @@ -12,6 +12,7 @@
PROJ_LOOSE_VERSION = version.parse(pyproj.__proj_version__)
PROJ_GTE_82 = PROJ_LOOSE_VERSION >= version.parse("8.2")
PROJ_GTE_901 = PROJ_LOOSE_VERSION >= version.parse("9.0.1")
PROJ_GTE_91 = PROJ_LOOSE_VERSION >= version.parse("9.1")
RGF93toWSG84 = "RGF93 v1 to WGS 84 (1)" if PROJ_GTE_82 else "RGF93 to WGS 84 (1)"


Expand Down
6 changes: 5 additions & 1 deletion test/crs/test_crs.py
Expand Up @@ -22,6 +22,7 @@
from pyproj.transformer import TransformerGroup
from test.conftest import (
PROJ_GTE_82,
PROJ_GTE_91,
PROJ_GTE_901,
RGF93toWSG84,
assert_can_pickle,
Expand Down Expand Up @@ -612,7 +613,10 @@ def test_coordinate_operation_grids__alternative_grid_name():
assert grid.short_name == "ca_nrc_ntv1_can.tif"
if grids_available(grid.short_name):
assert grid.available is True
assert grid.full_name.endswith(grid.short_name)
if PROJ_GTE_91:
assert grid.full_name == ""
else:
assert grid.full_name.endswith(grid.short_name)
else:
assert grid.available is False
assert grid.full_name == ""
Expand Down

0 comments on commit 21ccfc3

Please sign in to comment.