diff --git a/tests/portprinter/test_port_printer_queue.py b/tests/portprinter/test_port_printer_queue.py index d53339d2..ebda4321 100644 --- a/tests/portprinter/test_port_printer_queue.py +++ b/tests/portprinter/test_port_printer_queue.py @@ -48,9 +48,9 @@ def test_multiple_printers(tmpdir, with_two_components): assert os.path.isfile("air__density.nc") ds = xarray.open_dataset("air__density.nc", engine="h5netcdf") assert "air__density" in ds.variables - assert ds.dims["time"] == 5 + assert ds.sizes["time"] == 5 assert os.path.isfile("glacier_top_surface__slope.nc") ds = xarray.open_dataset("glacier_top_surface__slope.nc", engine="h5netcdf") assert "glacier_top_surface__slope" in ds.variables - assert ds.dims["time"] == 5 + assert ds.sizes["time"] == 5 diff --git a/tests/printers/nc/test_database.py b/tests/printers/nc/test_database.py index 5575f7ea..717d55b6 100644 --- a/tests/printers/nc/test_database.py +++ b/tests/printers/nc/test_database.py @@ -46,9 +46,9 @@ def test_2d_constant_shape(tmpdir): assert set(root.dims) == {"y", "x", "time"} assert set(root.data_vars) == {"mesh", "Elevation"} - assert root.dims["x"] == 3 - assert root.dims["y"] == 2 - assert root.dims["time"] == 2 + assert root.sizes["x"] == 3 + assert root.sizes["y"] == 2 + assert root.sizes["time"] == 2 assert root.variables["Elevation"].shape == (2, 2, 3) @@ -105,9 +105,9 @@ def test_2d_changing_shape(tmpdir): assert set(root.dims) == {"y", "x", "time"} assert set(root.data_vars) == {"mesh", "Temperature"} - assert root.dims["x"] == 3 - assert root.dims["y"] == 3 - assert root.dims["time"] == 1 + assert root.sizes["x"] == 3 + assert root.sizes["y"] == 3 + assert root.sizes["time"] == 1 assert root.data_vars["Temperature"].shape == (1, 3, 3) assert root.data_vars["Temperature"][0].data == approx(