Skip to content

Commit

Permalink
🧪 Added test reproducing error in find_axes when a xr.DataArray is pa…
Browse files Browse the repository at this point in the history
…ssed
  • Loading branch information
s-weigand committed Sep 27, 2024
1 parent 4d38e46 commit 69780cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/config/test_plot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import matplotlib.pyplot as plt
import pytest
import xarray as xr
from jsonschema import ValidationError as SchemaValidationError
from jsonschema import validate
from pydantic import ValidationError as PydanticValidationError
Expand Down Expand Up @@ -466,7 +467,10 @@ def func(
def test_find_axes():
"""Get axes value from iterable of values."""

base_values = ["foo", True, 1.5]
data_array = xr.DataArray([[0]], coords={"time": [0], "spectral": [500]})
data_set = xr.Dataset({"data": data_array})

base_values = ["foo", True, 1.5, data_array, data_set]

assert generator_is_exhausted(find_axes(base_values)) is True

Expand Down

0 comments on commit 69780cf

Please sign in to comment.