|
2 | 2 | import pytest |
3 | 3 | from flopy.discretization import StructuredGrid |
4 | 4 | from flopy.discretization.modeltime import ModelTime |
| 5 | +from modflow_devtools.dfn import Sln |
5 | 6 | from xarray import DataTree |
6 | 7 |
|
7 | 8 | from flopy4.mf6.component import COMPONENTS |
8 | 9 | from flopy4.mf6.constants import FILL_DNODATA |
9 | 10 | from flopy4.mf6.gwf import Chd, Dis, Gwf, Ic, Npf, Oc |
| 11 | +from flopy4.mf6.ims import Ims |
10 | 12 | from flopy4.mf6.simulation import Simulation |
11 | 13 | from flopy4.mf6.tdis import Tdis |
12 | 14 |
|
@@ -242,3 +244,27 @@ def test_gwf_dfn(): |
242 | 244 | assert dfn["ref"] is None |
243 | 245 | assert dfn["sln"] is None |
244 | 246 | assert "save_flows" in set(dfn["options"].keys()) |
| 247 | + |
| 248 | + |
| 249 | +def test_chd_dfn(): |
| 250 | + chd = Chd(strict=False) |
| 251 | + dfn = chd.dfn |
| 252 | + assert dfn["name"] == "chd" |
| 253 | + assert not dfn["advanced"] |
| 254 | + assert dfn["multi"] |
| 255 | + assert dfn["ref"] is None |
| 256 | + assert dfn["sln"] is None |
| 257 | + assert "print_input" in set(dfn["options"].keys()) |
| 258 | + assert "head" in set(dfn["period"].keys()) |
| 259 | + |
| 260 | + |
| 261 | +def test_ims_dfn(): |
| 262 | + ims = Ims(strict=False) |
| 263 | + dfn = ims.dfn |
| 264 | + assert dfn["name"] == "ims" |
| 265 | + assert not dfn["advanced"] |
| 266 | + assert not dfn["multi"] |
| 267 | + assert dfn["ref"] is None |
| 268 | + assert dfn["sln"] == Sln(abbr="ims", pattern="*") |
| 269 | + assert "complexity" in set(dfn["options"].keys()) |
| 270 | + assert "inner_maximum" in set(dfn["linear"].keys()) |
0 commit comments