Skip to content

Commit

Permalink
TST: test_coordinate_operation_grids__alternative_grid_name fixed to …
Browse files Browse the repository at this point in the history
…network full_name behavior
  • Loading branch information
snowman2 committed Jun 9, 2022
1 parent 289f8ef commit 48b1460
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def grids_available(*grid_names, check_network=True, check_all=False):
"""
Check if the grids are available
"""
if check_network and os.environ.get("PROJ_NETWORK") == "ON":
if check_network and pyproj.network.is_network_enabled():
return True
available = [
(
Expand Down
10 changes: 5 additions & 5 deletions test/crs/test_crs.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,12 +611,12 @@ 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 grids_available(grid.short_name):
if PROJ_GTE_91 and pyproj.network.is_network_enabled():
assert grid.available is True
if PROJ_GTE_91:
assert grid.full_name == ""
else:
assert grid.full_name.endswith(grid.short_name)
assert grid.full_name == ""
elif grids_available(grid.short_name):
assert grid.available is True
assert grid.full_name.endswith(grid.short_name)
else:
assert grid.available is False
assert grid.full_name == ""
Expand Down

0 comments on commit 48b1460

Please sign in to comment.