Skip to content

Commit d495006

Browse files
committed
test
1 parent 90bae73 commit d495006

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

test/test_component.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import numpy as np
2+
from xarray import DataTree
3+
14
from flopy4.mf6 import Simulation, Tdis
25
from flopy4.mf6.gwf import Dis, Gwf, Ic, Npf, Oc
36

@@ -13,4 +16,15 @@ def test_components():
1316
npf = Npf(model=gwf, icelltype=0, k=1.0)
1417

1518
# View the data tree.
16-
sim.data
19+
# sim.data
20+
assert isinstance(sim.data, DataTree)
21+
assert "tdis" in sim.data.children
22+
assert "gwf" in sim.data.children
23+
assert "dis" in sim.data.children["gwf"].children
24+
assert "ic" in sim.data.children["gwf"].children
25+
assert "oc" in sim.data.children["gwf"].children
26+
assert "npf" in sim.data.children["gwf"].children
27+
assert "perioddata" in sim.data.children["tdis"]
28+
assert np.array_equal(
29+
sim.data.children["gwf"].children["npf"].k, np.ones((4))
30+
)

0 commit comments

Comments
 (0)