paths/urls are all that's needed in text_fixtures
MODIFY
tests/test_fixtures.py
tests/test_fixtures.py
@@ -5,9 +5,7 @@ from pangeo_forge_recipes.utils import fix_scalar_attr_encoding
def test_fixture_local_files(daily_xarray_dataset, netcdf_paths):
- paths, items_per_file = netcdf_paths[:2]
- if len(netcdf_paths) == 4:
- fnames_by_variable, path_format = netcdf_paths[2:]
+ paths = netcdf_paths[0]
paths = [str(path) for path in paths]
combine = "nested" if len(netcdf_paths) == 2 else "by_coords"
ds = xr.open_mfdataset(paths, combine=combine, concat_dim="time", engine="h5netcdf")
@@ -15,9 +13,7 @@ def test_fixture_local_files(daily_xarray_dataset, netcdf_paths):
def test_fixture_http_files(daily_xarray_dataset, netcdf_http_paths):
- urls, items_per_file = netcdf_http_paths[:2]
- if len(netcdf_http_paths) == 4:
- fnames_by_variable, path_format = netcdf_http_paths[2:]
+ urls = netcdf_http_paths[0]
open_files = [fsspec.open(url).open() for url in urls]
combine = "nested" if len(netcdf_http_paths) == 2 else "by_coords"
ds = xr.open_mfdataset(open_files, combine=combine, concat_dim="time", engine="h5netcdf").load()

paths/urls are all that's needed in text_fixtures