Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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