diff --git a/pygmt/datasets/earth_day.py b/pygmt/datasets/earth_day.py index 2e62d2a1b25..f95a26f7071 100644 --- a/pygmt/datasets/earth_day.py +++ b/pygmt/datasets/earth_day.py @@ -5,12 +5,17 @@ The images are available in various resolutions. """ +import contextlib from collections.abc import Sequence from typing import Literal import xarray as xr from pygmt.datasets.load_remote_dataset import _load_remote_dataset +with contextlib.suppress(ImportError): + # rioxarray is needed to register the rio accessor + import rioxarray # noqa: F401 + __doctest_skip__ = ["load_blue_marble"] diff --git a/pygmt/datasets/earth_night.py b/pygmt/datasets/earth_night.py index 37c426eee9a..39742c8124e 100644 --- a/pygmt/datasets/earth_night.py +++ b/pygmt/datasets/earth_night.py @@ -5,12 +5,17 @@ The images are available in various resolutions. """ +import contextlib from collections.abc import Sequence from typing import Literal import xarray as xr from pygmt.datasets.load_remote_dataset import _load_remote_dataset +with contextlib.suppress(ImportError): + # rioxarray is needed to register the rio accessor + import rioxarray # noqa: F401 + __doctest_skip__ = ["load_black_marble"]