diff --git a/virtualizarr/tests/test_xarray.py b/virtualizarr/tests/test_xarray.py index 34e51c7b..220cc1d0 100644 --- a/virtualizarr/tests/test_xarray.py +++ b/virtualizarr/tests/test_xarray.py @@ -289,7 +289,23 @@ def test_combine_by_coords(self, netcdf4_files): ) assert combined_vds.xindexes["time"].to_pandas_index().is_monotonic_increasing + + @pytest.mark.xfail(reason="Not yet implemented, see issue #18") + def test_combine_by_coords_keeping_manifestarrays(self, netcdf4_files): + filepath1, filepath2 = netcdf4_files + + with pytest.warns(UserWarning, match="will create in-memory pandas indexes"): + vds1 = open_virtual_dataset(filepath1) + with pytest.warns(UserWarning, match="will create in-memory pandas indexes"): + vds2 = open_virtual_dataset(filepath2) + + combined_vds = xr.combine_by_coords( + [vds2, vds1], + ) + assert isinstance(combined_vds["time"].data, ManifestArray) + assert isinstance(combined_vds["lat"].data, ManifestArray) + assert isinstance(combined_vds["lon"].data, ManifestArray) @network @requires_s3fs