Skip to content

Commit

Permalink
fix MfList pkg data container test
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Nov 21, 2023
1 parent 7b70240 commit f629b79
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions autotest/test_modflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def test_mt_modelgrid(function_tmpdir):
assert np.array_equal(swt.modelgrid.idomain, ml.modelgrid.idomain)


@requires_exe("mp7")
@requires_exe("mp7", "mf2005")
def test_exe_selection(example_data_path, function_tmpdir):
model_path = example_data_path / "freyberg"
namfile_path = model_path / "freyberg.nam"
Expand Down Expand Up @@ -1288,6 +1288,7 @@ def test_load_with_list_reader(function_tmpdir):
assert np.array_equal(originalwelra, m2.wel.stress_period_data[0])


@requires_exe("mf2005")
@pytest.mark.parametrize(
"container",
[
Expand All @@ -1306,7 +1307,6 @@ def test_pkg_data_containers(function_tmpdir, container):
size = 100
nlay = 10
nper = 1
nsfr = int((size**2) / 5)

# grid discretization
dis = ModflowDis(
Expand Down Expand Up @@ -1357,15 +1357,19 @@ def test_pkg_data_containers(function_tmpdir, container):
well_spd[0] = df_per
wel = ModflowWel(m, stress_period_data=well_spd)

# streamflow routing pkg
rd = ModflowSfr2.get_empty_reach_data(nsfr)
rd["iseg"] = range(len(rd))
rd["ireach"] = 1
sd = ModflowSfr2.get_empty_segment_data(nsfr)
sd["nseg"] = range(len(sd))
sfr = ModflowSfr2(reach_data=rd, segment_data=sd, model=m)
# basic pkg
bas = ModflowBas(m)

return m
# solver
pcg = ModflowPcg(m)

# output control pkg
oc = ModflowOc(m)

# write and run the model
m.write_input()
success, _ = m.run_model(silent=False)
assert success


def get_perftest_model(ws, name):
Expand Down

0 comments on commit f629b79

Please sign in to comment.