Skip to content

Commit

Permalink
move left behind test
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNicholas committed Aug 27, 2024
1 parent cc56987 commit 01fbf48
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
17 changes: 17 additions & 0 deletions virtualizarr/tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,23 @@ def index_mappings_equal(indexes1: Mapping[str, Index], indexes2: Mapping[str, I
return True


class TestOpenVirtualDatasetAttrs:
def test_drop_array_dimensions(self, netcdf4_file):
# regression test for GH issue #150
vds = open_virtual_dataset(netcdf4_file, indexes={})
assert "_ARRAY_DIMENSIONS" not in vds["air"].attrs

def test_coordinate_variable_attrs_preserved(self, netcdf4_file):
# regression test for GH issue #155
vds = open_virtual_dataset(netcdf4_file, indexes={})
assert vds["lat"].attrs == {
"standard_name": "latitude",
"long_name": "Latitude",
"units": "degrees_north",
"axis": "Y",
}


@network
@requires_s3fs
class TestReadFromS3:
Expand Down
17 changes: 0 additions & 17 deletions virtualizarr/tests/test_xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,23 +222,6 @@ def test_concat_dim_coords_along_existing_dim(self):
assert result.data.zarray.zarr_format == zarray.zarr_format


class TestOpenVirtualDatasetAttrs:
def test_drop_array_dimensions(self, netcdf4_file):
# regression test for GH issue #150
vds = open_virtual_dataset(netcdf4_file, indexes={})
assert "_ARRAY_DIMENSIONS" not in vds["air"].attrs

def test_coordinate_variable_attrs_preserved(self, netcdf4_file):
# regression test for GH issue #155
vds = open_virtual_dataset(netcdf4_file, indexes={})
assert vds["lat"].attrs == {
"standard_name": "latitude",
"long_name": "Latitude",
"units": "degrees_north",
"axis": "Y",
}


class TestCombineUsingIndexes:
def test_combine_by_coords(self, netcdf4_files):
filepath1, filepath2 = netcdf4_files
Expand Down

0 comments on commit 01fbf48

Please sign in to comment.