Skip to content

Commit

Permalink
new test to show how #18 doesn't fully work yet
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNicholas committed Jul 1, 2024
1 parent 0c0053b commit d5b12b6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions virtualizarr/tests/test_xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d5b12b6

Please sign in to comment.