Skip to content

Commit 516b2f2

Browse files
authored
Remove the unnecessary which call in load_static_earth_relief (#3943)
1 parent 84921a0 commit 516b2f2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pygmt/helpers/testing.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import xarray as xr
1111
from pygmt.exceptions import GMTImageComparisonFailure
12-
from pygmt.src import which
1312

1413

1514
def check_figures_equal(*, extensions=("png",), tol=0.0, result_dir="result_images"):
@@ -144,17 +143,18 @@ def wrapper(*args, ext="png", request=None, **kwargs):
144143
return decorator
145144

146145

147-
def load_static_earth_relief():
146+
def load_static_earth_relief() -> xr.DataArray:
148147
"""
149-
Load the static_earth_relief file for internal testing.
148+
Load the static_earth_relief.nc file for internal testing.
150149
151150
Returns
152151
-------
153-
data : xarray.DataArray
152+
data
154153
A grid of Earth relief for internal tests.
155154
"""
156-
fname = which("@static_earth_relief.nc", download="c")
157-
return xr.load_dataarray(fname, engine="gmt", raster_kind="grid")
155+
return xr.load_dataarray(
156+
"@static_earth_relief.nc", engine="gmt", raster_kind="grid"
157+
)
158158

159159

160160
def skip_if_no(package):

0 commit comments

Comments
 (0)