Skip to content

Commit a54ff86

Browse files
authored
Improve stability of test_which_nonascii_path (#4663)
1 parent bbbfff9 commit a54ff86

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pygmt/tests/test_which.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ def test_which_nonascii_path(monkeypatch):
6868
# Start a new session
6969
begin()
7070
# GMT should download the remote file under the new home directory.
71-
fname = which(fname="@static_earth_relief.nc", download="cache")
71+
try:
72+
fname = which(fname="@static_earth_relief.nc", download="cache")
73+
except FileNotFoundError:
74+
pytest.skip("Failed to download the file, skipping the test.")
7275
assert fname.startswith(fakehome)
7376
assert fname.endswith("static_earth_relief.nc")
7477
end()

0 commit comments

Comments
 (0)