We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb005b1 commit bc37fa8Copy full SHA for bc37fa8
tests/test_specs.py
@@ -5,9 +5,10 @@
5
6
# dependencies
7
import numpy as np
8
+import xarray as xr
9
from typing_extensions import Annotated as Ann
10
from typing_extensions import Literal as L
-from xarray_dataclasses.specs import DataSpec
11
+from xarray_dataclasses.specs import DataOptions, DataSpec
12
from xarray_dataclasses.typing import Attr, Coordof, Data, Name
13
14
@@ -171,3 +172,10 @@ def test_name() -> None:
171
172
assert spec.role == "name"
173
assert spec.type is str
174
assert spec.default == "weather"
175
+
176
177
+def test_dataoptions() -> None:
178
+ options = DataOptions(xr.DataArray)
179
180
+ assert DataSpec().options.factory is type(None)
181
+ assert DataSpec(options=options).options.factory is xr.DataArray
0 commit comments