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 f14ed45 commit 2be53faCopy full SHA for 2be53fa
test/test_cattrs.py
@@ -74,3 +74,16 @@ def test_unstructure_xarray_tree():
74
# the xarray as is.
75
# This helps when finally converting the dictionary to MF6 input files.
76
assert x_tree is f_dict["x"]
77
+
78
79
+def test_unstructure_xarray_tree_no_hook():
80
+ x_arr = xr.DataArray([1, 2, 3])
81
+ x_set = xr.Dataset({"x": x_arr})
82
+ x_tree = xr.DataTree(x_set)
83
+ f = Baz(x=x_tree)
84
85
+ f_dict = unstructure(f)
86
87
+ # Unfortunately the default converter seems to make a copy of the DataTree
88
+ # and doesn't keep the original reference.
89
+ assert x_tree is not f_dict["x"]
0 commit comments