Skip to content

Commit

Permalink
assert shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen committed Sep 25, 2023
1 parent e33cd99 commit ac66224
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qcodes/tests/dataset/test_dataset_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ def test_export_2d_dataset(

def test_export_non_grid_dataset_xarray(mock_dataset_non_grid: DataSet) -> None:
xr_ds = mock_dataset_non_grid.to_xarray_dataset()
assert xr_ds.dims == {"multi_index": 50}
assert len(xr_ds.coords) == 3 # dims + 1 multi index
assert "x" in xr_ds.coords
assert len(xr_ds.coords["x"].attrs) == 8
Expand Down Expand Up @@ -727,6 +728,7 @@ def test_export_non_grid_dataset(
assert "multi_index" in xr_ds.coords
assert "x" in xr_ds.coords
assert "y" in xr_ds.coords
assert xr_ds.dims == {"multi_index": 50}

expected_path = f"qcodes_{mock_dataset_non_grid.captured_run_id}_{mock_dataset_non_grid.guid}.nc"

Check notice on line 733 in qcodes/tests/dataset/test_dataset_export.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

qcodes/tests/dataset/test_dataset_export.py#L733

Line too long (101/88)
assert os.listdir(path) == [expected_path]
Expand Down

0 comments on commit ac66224

Please sign in to comment.