Skip to content

Commit

Permalink
make test optional when adls is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
floriankrb committed Oct 31, 2024
1 parent 65485a4 commit 0574583
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/xarray/test_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@
# nor does it submit to any jurisdiction.


import pytest
import xarray as xr

from anemoi.datasets.create.functions.sources.xarray import XarrayFieldList
from anemoi.datasets.data.stores import name_to_zarr_store
from anemoi.datasets.testing import assert_field_list

try:
import adlfs # noqa: F401

HAS_ADLS = True
except ImportError:
HAS_ADLS = False


def test_arco_era5_1():

Expand Down Expand Up @@ -118,6 +126,7 @@ def test_noaa_replay():
)


@pytest.mark.skipif(not HAS_ADLS, reason="package adlfs not installed")
def test_planetary_computer_conus404():
url = "https://planetarycomputer.microsoft.com/api/stac/v1/collections/conus404"
ds = xr.open_zarr(**name_to_zarr_store(url))
Expand Down

0 comments on commit 0574583

Please sign in to comment.