Skip to content

Commit 19fc3cd

Browse files
committed
better test
1 parent 2a7af0d commit 19fc3cd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

flopy4/mf6/converters.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import numpy as np
32
from numpy.typing import NDArray
43
from xattree import _get_xatspec

test/test_component.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from xarray import DataTree
55

66
from flopy4.mf6.component import COMPONENTS
7+
from flopy4.mf6.constants import FILL_DNODATA
78
from flopy4.mf6.gwf import Chd, Dis, Gwf, Ic, Npf, Oc
89
from flopy4.mf6.simulation import Simulation
910
from flopy4.mf6.tdis import Tdis
@@ -118,3 +119,8 @@ def test_init_sim():
118119
assert gwf.chd[0] is chd
119120
assert np.array_equal(sim.models["gwf"].npf.k, np.ones(100))
120121
assert np.array_equal(sim.models["gwf"].npf.data.k, np.ones(100))
122+
assert chd.head[0, 0] == 1.0
123+
assert chd.head[0, 99] == 0.0
124+
assert np.array_equal(chd.head[0, 1:99], np.full((98,), FILL_DNODATA))
125+
assert np.array_equal(chd.head, chd.data.head)
126+
assert np.array_equal(chd.head, sim.models["gwf"].chd[0].data.head)

0 commit comments

Comments
 (0)