From 2ae412946dec8b8591258980ac139b062c8695fb Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Wed, 27 Dec 2023 23:09:32 -0500 Subject: [PATCH] test(framework): misc cleanup (#1528) * mention support for mf6-mf6 comparisons * simplify parametrize arg, don't wrap with list * consistent build_models() and check_output() --- autotest/framework.py | 1 + autotest/test_gwf_ats01.py | 5 +--- autotest/test_gwf_ats02.py | 5 +--- autotest/test_gwf_ats03.py | 5 +--- autotest/test_gwf_ats_lak01.py | 5 +--- autotest/test_gwf_auxvars.py | 5 +--- autotest/test_gwf_auxvars02.py | 5 +--- autotest/test_gwf_boundname01.py | 5 +--- autotest/test_gwf_buy_lak01.py | 5 +--- autotest/test_gwf_buy_lak02.py | 2 +- autotest/test_gwf_buy_maw01.py | 5 +--- autotest/test_gwf_buy_sfr01.py | 2 +- autotest/test_gwf_chd01.py | 2 +- autotest/test_gwf_chd02.py | 2 +- autotest/test_gwf_csub_db01_nr.py | 5 +--- autotest/test_gwf_csub_dbgeo01.py | 2 +- autotest/test_gwf_csub_distypes.py | 12 ++++------ autotest/test_gwf_csub_inelastic.py | 5 +--- autotest/test_gwf_csub_ndb01_nr.py | 5 +--- autotest/test_gwf_csub_sk01.py | 2 +- autotest/test_gwf_csub_sk02.py | 5 +--- autotest/test_gwf_csub_sk03.py | 5 +--- autotest/test_gwf_csub_sk04_nr.py | 5 +--- autotest/test_gwf_csub_sub01.py | 5 +--- autotest/test_gwf_csub_sub01_adjmat.py | 2 +- autotest/test_gwf_csub_sub01_elastic.py | 5 +--- autotest/test_gwf_csub_sub01_pch.py | 5 +--- autotest/test_gwf_csub_sub02.py | 5 +--- autotest/test_gwf_csub_sub03.py | 5 +--- autotest/test_gwf_csub_subwt01.py | 5 +--- autotest/test_gwf_csub_subwt02.py | 5 +--- autotest/test_gwf_csub_subwt03.py | 5 +--- autotest/test_gwf_csub_wc01.py | 5 +--- autotest/test_gwf_csub_wtgeo.py | 2 +- autotest/test_gwf_csub_zdisp01.py | 12 ++++------ autotest/test_gwf_disu.py | 2 +- autotest/test_gwf_disv.py | 2 +- autotest/test_gwf_disv_uzf.py | 2 +- autotest/test_gwf_drn_ddrn01.py | 5 +--- autotest/test_gwf_drn_ddrn02.py | 5 +--- autotest/test_gwf_evt01.py | 5 +--- autotest/test_gwf_evt02.py | 5 +--- autotest/test_gwf_henry_nr.py | 5 +--- autotest/test_gwf_ifmod_buy.py | 5 +--- autotest/test_gwf_ifmod_idomain.py | 5 +--- autotest/test_gwf_ifmod_mult_exg.py | 5 +--- autotest/test_gwf_ifmod_newton.py | 5 +--- autotest/test_gwf_ifmod_rewet.py | 5 +--- autotest/test_gwf_ifmod_vert.py | 5 +--- autotest/test_gwf_ifmod_xt3d01.py | 5 +--- autotest/test_gwf_ifmod_xt3d02.py | 5 +--- autotest/test_gwf_ims_rcm_reorder.py | 5 +--- autotest/test_gwf_lak_bedleak.py | 5 +--- autotest/test_gwf_lak_wetlakbedarea01.py | 5 +--- autotest/test_gwf_lak_wetlakbedarea02.py | 5 +--- autotest/test_gwf_laket.py | 5 +--- autotest/test_gwf_libmf6_evt01.py | 5 +--- autotest/test_gwf_libmf6_ghb01.py | 5 +--- autotest/test_gwf_libmf6_ifmod01.py | 5 +--- autotest/test_gwf_libmf6_ifmod02.py | 5 +--- autotest/test_gwf_libmf6_ifmod03.py | 5 +--- autotest/test_gwf_libmf6_rch01.py | 5 +--- autotest/test_gwf_libmf6_rch02.py | 5 +--- autotest/test_gwf_libmf6_riv01.py | 5 +--- autotest/test_gwf_libmf6_riv02.py | 5 +--- autotest/test_gwf_libmf6_sto01.py | 5 +--- autotest/test_gwf_maw01.py | 2 +- autotest/test_gwf_maw02.py | 2 +- autotest/test_gwf_maw03.py | 2 +- autotest/test_gwf_maw05.py | 5 +--- autotest/test_gwf_maw06.py | 5 +--- autotest/test_gwf_maw07.py | 5 +--- autotest/test_gwf_maw08.py | 5 +--- autotest/test_gwf_maw09.py | 5 +--- autotest/test_gwf_maw10.py | 5 +--- .../test_gwf_mf6io_app2_examples_distypes.py | 11 ++++----- autotest/test_gwf_multimvr.py | 5 +--- autotest/test_gwf_mvr01.py | 5 +--- autotest/test_gwf_newton01.py | 5 +--- autotest/test_gwf_newton_under_relaxation.py | 5 +--- autotest/test_gwf_noptc01.py | 5 +--- autotest/test_gwf_npf01_75x75.py | 11 ++++----- autotest/test_gwf_npf02_rewet.py | 5 +--- autotest/test_gwf_npf03_sfr.py | 5 +--- autotest/test_gwf_npf04_spdis.py | 5 +--- autotest/test_gwf_npf05_anisotropy.py | 5 +--- autotest/test_gwf_npf_thickstrt.py | 5 +--- autotest/test_gwf_npf_tvk01.py | 5 +--- autotest/test_gwf_npf_tvk02.py | 5 +--- autotest/test_gwf_npf_tvk03.py | 5 +--- autotest/test_gwf_npf_tvk04.py | 5 +--- autotest/test_gwf_npf_tvk05.py | 5 +--- autotest/test_gwf_obs01.py | 5 +--- autotest/test_gwf_obs02.py | 5 +--- autotest/test_gwf_pertim.py | 5 +--- autotest/test_gwf_ptc01.py | 5 +--- autotest/test_gwf_rch01.py | 5 +--- autotest/test_gwf_rch02.py | 5 +--- autotest/test_gwf_rch03.py | 5 +--- autotest/test_gwf_sfr01gwfgwf.py | 5 +--- autotest/test_gwf_sfr_badfactor.py | 2 +- autotest/test_gwf_sfr_diversion.py | 2 +- autotest/test_gwf_sfr_evap.py | 5 +--- autotest/test_gwf_sfr_npoint01.py | 5 +--- autotest/test_gwf_sfr_npoint02.py | 5 +--- autotest/test_gwf_sfr_npoint03.py | 5 +--- autotest/test_gwf_sfr_reorder.py | 5 +--- autotest/test_gwf_sfr_wetstrmbedarea.py | 5 +--- autotest/test_gwf_sto01.py | 11 ++++----- autotest/test_gwf_sto02.py | 5 +--- autotest/test_gwf_sto03.py | 5 +--- autotest/test_gwf_sto_tvs01.py | 5 +--- autotest/test_gwf_ts_lak01.py | 5 +--- autotest/test_gwf_ts_maw01.py | 5 +--- autotest/test_gwf_ts_sfr01.py | 5 +--- autotest/test_gwf_ts_sfr02.py | 5 +--- autotest/test_gwf_ts_uzf01.py | 5 +--- autotest/test_gwf_utl01_binaryinput.py | 5 +--- autotest/test_gwf_utl02_timeseries.py | 5 +--- autotest/test_gwf_utl03_obs01.py | 23 ++++++++----------- autotest/test_gwf_utl04_auxmult.py | 5 +--- autotest/test_gwf_utl05_budparse.py | 5 +--- autotest/test_gwf_utl06_tas.py | 5 +--- autotest/test_gwf_uzf01.py | 5 +--- autotest/test_gwf_uzf02.py | 5 +--- autotest/test_gwf_uzf03.py | 5 +--- autotest/test_gwf_uzf04.py | 5 +--- autotest/test_gwf_uzf05.py | 5 +--- autotest/test_gwf_uzf_wc_output.py | 5 +--- autotest/test_gwf_vsc01.py | 5 +--- autotest/test_gwf_vsc02.py | 5 +--- autotest/test_gwf_vsc03_sfr.py | 5 +--- autotest/test_gwf_vsc04_lak.py | 5 +--- autotest/test_gwf_vsc05_hfb.py | 5 +--- autotest/test_gwf_wel01.py | 5 +--- autotest/test_gwf_zb01.py | 12 ++++------ autotest/test_gwfgwf_lgr.py | 5 +--- autotest/test_gwt_adv01.py | 5 +--- autotest/test_gwt_adv01_fmi.py | 5 +--- autotest/test_gwt_adv01_gwtgwt.py | 5 +--- autotest/test_gwt_adv02.py | 5 +--- autotest/test_gwt_adv03.py | 5 +--- autotest/test_gwt_adv04.py | 5 +--- autotest/test_gwt_buy_solute_heat.py | 5 +--- autotest/test_gwt_disu01.py | 5 +--- autotest/test_gwt_dsp01.py | 5 +--- autotest/test_gwt_dsp01_fmi.py | 5 +--- autotest/test_gwt_dsp01_gwtgwt.py | 5 +--- autotest/test_gwt_dsp01_noadv.py | 5 +--- autotest/test_gwt_dsp02.py | 5 +--- autotest/test_gwt_dsp03.py | 5 +--- autotest/test_gwt_dsp04.py | 5 +--- autotest/test_gwt_dsp05_noadv.py | 5 +--- autotest/test_gwt_fmi01.py | 5 +--- autotest/test_gwt_henry.py | 5 +--- autotest/test_gwt_henry_gwtgwt.py | 5 +--- autotest/test_gwt_henry_nr.py | 5 +--- autotest/test_gwt_henry_openclose.py | 5 +--- autotest/test_gwt_ims_issue655.py | 5 +--- autotest/test_gwt_ist01.py | 5 +--- autotest/test_gwt_ist02.py | 5 +--- autotest/test_gwt_lkt01.py | 5 +--- autotest/test_gwt_lkt02.py | 5 +--- autotest/test_gwt_lkt03.py | 5 +--- autotest/test_gwt_lkt04.py | 5 +--- autotest/test_gwt_moc3d01.py | 5 +--- autotest/test_gwt_moc3d01_zod.py | 5 +--- autotest/test_gwt_moc3d02.py | 5 +--- autotest/test_gwt_moc3d03.py | 5 +--- autotest/test_gwt_mst01.py | 5 +--- autotest/test_gwt_mst02.py | 5 +--- autotest/test_gwt_mst03.py | 5 +--- autotest/test_gwt_mst04_noadv.py | 5 +--- autotest/test_gwt_mst05.py | 5 +--- autotest/test_gwt_mst06_noadv.py | 5 +--- autotest/test_gwt_mvt01.py | 5 +--- autotest/test_gwt_mvt02.py | 5 +--- autotest/test_gwt_mwt01.py | 5 +--- autotest/test_gwt_mwt02.py | 2 +- autotest/test_gwt_obs01.py | 5 +--- autotest/test_gwt_prudic2004t2.py | 5 +--- autotest/test_gwt_prudic2004t2gwtgwt.py | 5 +--- autotest/test_gwt_sft01.py | 5 +--- autotest/test_gwt_sft01gwtgwt.py | 5 +--- autotest/test_gwt_src01.py | 5 +--- autotest/test_gwt_ssm02.py | 5 +--- autotest/test_gwt_ssm03.py | 5 +--- autotest/test_gwt_ssm04.py | 5 +--- autotest/test_gwt_ssm05.py | 5 +--- autotest/test_gwt_uzt01.py | 5 +--- autotest/test_gwt_zb01.py | 8 +++---- autotest/test_gwtgwt_oldexg.py | 5 +--- autotest/test_mf6_tmp_simulations.py | 5 +--- autotest/test_par_gwf01.py | 5 +--- autotest/test_par_gwf02.py | 5 +--- autotest/test_par_gwf03.py | 5 +--- autotest/test_par_gwf_idomain.py | 5 +--- autotest/test_par_gwf_ims_csv.py | 9 +++----- autotest/test_par_gwf_newton.py | 5 +--- .../test_par_gwf_newton_under_relaxation.py | 5 +--- autotest/test_par_gwf_pakcc.py | 5 +--- autotest/test_par_gwf_rewet.py | 5 +--- autotest/test_par_gwf_xt3d02.py | 5 +--- autotest/test_par_gwt_adv01.py | 5 +--- autotest/test_par_gwt_dsp01.py | 5 +--- autotest/test_par_gwt_henry.py | 5 +--- 206 files changed, 238 insertions(+), 801 deletions(-) diff --git a/autotest/framework.py b/autotest/framework.py index d429d7da121..b000fd467cd 100644 --- a/autotest/framework.py +++ b/autotest/framework.py @@ -243,6 +243,7 @@ class TestFramework: Defines a MODFLOW 6 test and its lifecycle, with configurable hooks to evaluate results or run other models for comparison: + - MODFLOW 6 (directly or via API) - MODFLOW-2005 - MODFLOW-NWT - MODFLOW-USG diff --git a/autotest/test_gwf_ats01.py b/autotest/test_gwf_ats01.py index fb9b14e71fd..a2becae2240 100644 --- a/autotest/test_gwf_ats01.py +++ b/autotest/test_gwf_ats01.py @@ -202,10 +202,7 @@ def check_output(idx, test): assert v == 10.0, f"Last time should be 10. Found {v}" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_ats02.py b/autotest/test_gwf_ats02.py index 6c3bcae745f..7e03230de24 100644 --- a/autotest/test_gwf_ats02.py +++ b/autotest/test_gwf_ats02.py @@ -228,10 +228,7 @@ def check_output(idx, test): ), "layer 1 should be dry for this period" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_ats03.py b/autotest/test_gwf_ats03.py index f959ac549fc..7685321011f 100644 --- a/autotest/test_gwf_ats03.py +++ b/autotest/test_gwf_ats03.py @@ -204,10 +204,7 @@ def check_output(idx, test): assert np.allclose(answer, result), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_ats_lak01.py b/autotest/test_gwf_ats_lak01.py index 602be8af165..90d9a0ad55d 100644 --- a/autotest/test_gwf_ats_lak01.py +++ b/autotest/test_gwf_ats_lak01.py @@ -409,10 +409,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_auxvars.py b/autotest/test_gwf_auxvars.py index 6ba5d727685..d80123906a4 100644 --- a/autotest/test_gwf_auxvars.py +++ b/autotest/test_gwf_auxvars.py @@ -297,10 +297,7 @@ def check_output(idx, test): assert np.allclose(r["AUX2"], auxvar2) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_auxvars02.py b/autotest/test_gwf_auxvars02.py index 5422ed54112..b7c82acf1a0 100644 --- a/autotest/test_gwf_auxvars02.py +++ b/autotest/test_gwf_auxvars02.py @@ -117,10 +117,7 @@ def check_output(idx, test): assert np.allclose(r[aname], a) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_boundname01.py b/autotest/test_gwf_boundname01.py index ae9305fa9f7..e10fdc54fa1 100644 --- a/autotest/test_gwf_boundname01.py +++ b/autotest/test_gwf_boundname01.py @@ -163,10 +163,7 @@ def check_output(idx, test): assert np.array_equal(obs0, obs1), "observations are not identical" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_buy_lak01.py b/autotest/test_gwf_buy_lak01.py index 1bff08ddd47..8641c87d8b7 100644 --- a/autotest/test_gwf_buy_lak01.py +++ b/autotest/test_gwf_buy_lak01.py @@ -252,10 +252,7 @@ def check_output(idx, test): # assert False -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_buy_lak02.py b/autotest/test_gwf_buy_lak02.py index c095ef83378..204cc382363 100644 --- a/autotest/test_gwf_buy_lak02.py +++ b/autotest/test_gwf_buy_lak02.py @@ -446,7 +446,7 @@ def check_output(idx, test): # todo: add a better check of the lake concentrations -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, targets, function_tmpdir): framework = TestFramework( name=name, diff --git a/autotest/test_gwf_buy_maw01.py b/autotest/test_gwf_buy_maw01.py index 6d269fa127a..8def29a12ae 100644 --- a/autotest/test_gwf_buy_maw01.py +++ b/autotest/test_gwf_buy_maw01.py @@ -249,10 +249,7 @@ def check_output(idx, test): assert np.allclose(qmaw, -qgwf), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_buy_sfr01.py b/autotest/test_gwf_buy_sfr01.py index e7a3dd05bf1..cf49f0d198b 100644 --- a/autotest/test_gwf_buy_sfr01.py +++ b/autotest/test_gwf_buy_sfr01.py @@ -456,7 +456,7 @@ def check_output(idx, test): ), f"reach {n} flow {qcalc} not equal {qsim}" -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_chd01.py b/autotest/test_gwf_chd01.py index bf623c6e34c..0ee33dab664 100644 --- a/autotest/test_gwf_chd01.py +++ b/autotest/test_gwf_chd01.py @@ -132,7 +132,7 @@ def check_output(idx, test): ), "simulated head do not match with known solution." -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_chd02.py b/autotest/test_gwf_chd02.py index 0c13da124d3..af30d11a1b1 100644 --- a/autotest/test_gwf_chd02.py +++ b/autotest/test_gwf_chd02.py @@ -90,7 +90,7 @@ def check_output(idx, test): ), "simulated head does not match with known solution." -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_db01_nr.py b/autotest/test_gwf_csub_db01_nr.py index 888f09ee812..7f96b7707c0 100644 --- a/autotest/test_gwf_csub_db01_nr.py +++ b/autotest/test_gwf_csub_db01_nr.py @@ -404,10 +404,7 @@ def check_output(idx, test): print(" " + msg) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_dbgeo01.py b/autotest/test_gwf_csub_dbgeo01.py index 2901bc17f4b..2f49d4299ac 100644 --- a/autotest/test_gwf_csub_dbgeo01.py +++ b/autotest/test_gwf_csub_dbgeo01.py @@ -355,7 +355,7 @@ def check_output(idx, test): print(" " + msg) -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_distypes.py b/autotest/test_gwf_csub_distypes.py index 6f00ce573b3..dd29974a020 100644 --- a/autotest/test_gwf_csub_distypes.py +++ b/autotest/test_gwf_csub_distypes.py @@ -218,7 +218,8 @@ def build_well_data(modelgrid): return {1: well_spd} -def build_models(idx, test, gridgen): +def build_models(idx, test): + gridgen = try_get_target(test.targets, "gridgen") return build_mf6(idx, test.workspace, gridgen), None @@ -422,18 +423,13 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): - gridgen = try_get_target(targets, "gridgen") test = TestFramework( name=name, workspace=function_tmpdir, - build=lambda t: build_models(idx, t, gridgen), + build=lambda t: build_models(idx, t), check=lambda t: check_output(idx, t), targets=targets, - verbose=False, ) test.run() diff --git a/autotest/test_gwf_csub_inelastic.py b/autotest/test_gwf_csub_inelastic.py index 72b17050fab..dd5546092f2 100644 --- a/autotest/test_gwf_csub_inelastic.py +++ b/autotest/test_gwf_csub_inelastic.py @@ -245,10 +245,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_ndb01_nr.py b/autotest/test_gwf_csub_ndb01_nr.py index 1aa4fe4f99d..8923da61787 100644 --- a/autotest/test_gwf_csub_ndb01_nr.py +++ b/autotest/test_gwf_csub_ndb01_nr.py @@ -376,10 +376,7 @@ def check_output(idx, test): print(" " + msg) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_sk01.py b/autotest/test_gwf_csub_sk01.py index 1365d3c9e5c..9d993088617 100644 --- a/autotest/test_gwf_csub_sk01.py +++ b/autotest/test_gwf_csub_sk01.py @@ -448,7 +448,7 @@ def check_output(idx, test): print(" " + msg) -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_sk02.py b/autotest/test_gwf_csub_sk02.py index be1f811e6b0..62f546f77e9 100644 --- a/autotest/test_gwf_csub_sk02.py +++ b/autotest/test_gwf_csub_sk02.py @@ -445,10 +445,7 @@ def check_output(idx, test): print(" " + msg) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_sk03.py b/autotest/test_gwf_csub_sk03.py index 4f1465aff19..a12fca651b0 100644 --- a/autotest/test_gwf_csub_sk03.py +++ b/autotest/test_gwf_csub_sk03.py @@ -594,10 +594,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_sk04_nr.py b/autotest/test_gwf_csub_sk04_nr.py index 18ac02cf6ce..8b0e5c748e6 100644 --- a/autotest/test_gwf_csub_sk04_nr.py +++ b/autotest/test_gwf_csub_sk04_nr.py @@ -325,10 +325,7 @@ def check_output(idx, test): print(" " + msg) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_sub01.py b/autotest/test_gwf_csub_sub01.py index 592c02aa34d..d0e40fcc99a 100644 --- a/autotest/test_gwf_csub_sub01.py +++ b/autotest/test_gwf_csub_sub01.py @@ -370,10 +370,7 @@ def cbc_compare(test): print(" " + msg) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_sub01_adjmat.py b/autotest/test_gwf_csub_sub01_adjmat.py index b1bc8e9176b..c37adcaf16d 100644 --- a/autotest/test_gwf_csub_sub01_adjmat.py +++ b/autotest/test_gwf_csub_sub01_adjmat.py @@ -440,7 +440,7 @@ def cbc_compare(test): print(" " + msg) -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_sub01_elastic.py b/autotest/test_gwf_csub_sub01_elastic.py index b18ca87daa4..05a59a2045a 100644 --- a/autotest/test_gwf_csub_sub01_elastic.py +++ b/autotest/test_gwf_csub_sub01_elastic.py @@ -334,10 +334,7 @@ def cbc_compare(test): print(" " + msg) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_sub01_pch.py b/autotest/test_gwf_csub_sub01_pch.py index 05b1971f6fa..970e665a3c7 100644 --- a/autotest/test_gwf_csub_sub01_pch.py +++ b/autotest/test_gwf_csub_sub01_pch.py @@ -367,10 +367,7 @@ def cbc_compare(test): print(" " + msg) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_sub02.py b/autotest/test_gwf_csub_sub02.py index 54574baae0f..07985c835d5 100644 --- a/autotest/test_gwf_csub_sub02.py +++ b/autotest/test_gwf_csub_sub02.py @@ -207,10 +207,7 @@ def build_models(idx, test): return sim, mc -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_sub03.py b/autotest/test_gwf_csub_sub03.py index 80a02ba4d2b..cdd41d0b6ea 100644 --- a/autotest/test_gwf_csub_sub03.py +++ b/autotest/test_gwf_csub_sub03.py @@ -432,10 +432,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_subwt01.py b/autotest/test_gwf_csub_subwt01.py index 6c1b0d2c7cb..a1ff03b8aa7 100644 --- a/autotest/test_gwf_csub_subwt01.py +++ b/autotest/test_gwf_csub_subwt01.py @@ -395,10 +395,7 @@ def cbc_compare(test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_subwt02.py b/autotest/test_gwf_csub_subwt02.py index 8fa348b71c1..877e5474d4c 100644 --- a/autotest/test_gwf_csub_subwt02.py +++ b/autotest/test_gwf_csub_subwt02.py @@ -568,10 +568,7 @@ def cbc_compare(test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_subwt03.py b/autotest/test_gwf_csub_subwt03.py index db01f341bd8..14c56e899d3 100644 --- a/autotest/test_gwf_csub_subwt03.py +++ b/autotest/test_gwf_csub_subwt03.py @@ -504,10 +504,7 @@ def cbc_compare(test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_wc01.py b/autotest/test_gwf_csub_wc01.py index 1e5738d5a4c..516bd661fb1 100644 --- a/autotest/test_gwf_csub_wc01.py +++ b/autotest/test_gwf_csub_wc01.py @@ -498,10 +498,7 @@ def cbc_compare(test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_wtgeo.py b/autotest/test_gwf_csub_wtgeo.py index 6b30cacd3eb..a0f50764e8d 100644 --- a/autotest/test_gwf_csub_wtgeo.py +++ b/autotest/test_gwf_csub_wtgeo.py @@ -624,7 +624,7 @@ def cbc_compare(test): @pytest.mark.slow -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_csub_zdisp01.py b/autotest/test_gwf_csub_zdisp01.py index 469b5a14bf3..3f6e1de4dcc 100644 --- a/autotest/test_gwf_csub_zdisp01.py +++ b/autotest/test_gwf_csub_zdisp01.py @@ -192,7 +192,7 @@ # variant SUB package problem 3 -def build_models(idx, test, targets): +def build_models(idx, test): name = cases[idx] # build MODFLOW 6 files @@ -330,7 +330,7 @@ def build_models(idx, test, targets): cpth = cmppth ws = os.path.join(test.workspace, cpth) mc = flopy.modflow.Modflow( - name, model_ws=ws, version=cpth, exe_name=targets.mfnwt + name, model_ws=ws, version=cpth, exe_name=test.targets.mfnwt ) dis = flopy.modflow.ModflowDis( mc, @@ -548,18 +548,14 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, workspace=function_tmpdir, targets=targets, - build=lambda t: build_models(idx, t, targets), + build=lambda t: build_models(idx, t), check=lambda t: check_output(idx, t), htol=htol[idx], - verbose=False, ) test.run() diff --git a/autotest/test_gwf_disu.py b/autotest/test_gwf_disu.py index 1433a6a331b..c850d48f390 100644 --- a/autotest/test_gwf_disu.py +++ b/autotest/test_gwf_disu.py @@ -77,7 +77,7 @@ def check_output(idx, test): assert ja.shape[0] == 126, "ja should have size of 126" -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_disv.py b/autotest/test_gwf_disv.py index 050e83072be..31b08cba952 100644 --- a/autotest/test_gwf_disv.py +++ b/autotest/test_gwf_disv.py @@ -83,7 +83,7 @@ def check_output(idx, test): assert ja.shape[0] == 126, "ja should have size of 126" -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_disv_uzf.py b/autotest/test_gwf_disv_uzf.py index ba1decd213d..e681c041df1 100644 --- a/autotest/test_gwf_disv_uzf.py +++ b/autotest/test_gwf_disv_uzf.py @@ -381,7 +381,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_drn_ddrn01.py b/autotest/test_gwf_drn_ddrn01.py index 76b3f64a682..881a2c74622 100644 --- a/autotest/test_gwf_drn_ddrn01.py +++ b/autotest/test_gwf_drn_ddrn01.py @@ -186,10 +186,7 @@ def drain_smoothing(xdiff, xrange, newton=False): return f -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_drn_ddrn02.py b/autotest/test_gwf_drn_ddrn02.py index e841953c81d..f69068b235f 100644 --- a/autotest/test_gwf_drn_ddrn02.py +++ b/autotest/test_gwf_drn_ddrn02.py @@ -169,10 +169,7 @@ def check_output(idx, test): print(" " + msg) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_evt01.py b/autotest/test_gwf_evt01.py index 1b14f5cbbb3..33b4ca458c2 100644 --- a/autotest/test_gwf_evt01.py +++ b/autotest/test_gwf_evt01.py @@ -174,10 +174,7 @@ def check_output(idx, test): assert np.allclose(sim_evt_rate, cal_evt_rate), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_evt02.py b/autotest/test_gwf_evt02.py index 38947286528..a8b6adebfbb 100644 --- a/autotest/test_gwf_evt02.py +++ b/autotest/test_gwf_evt02.py @@ -156,10 +156,7 @@ def check_output(idx, test): assert os.path.isfile(fpth), "model did not run with nseg=1 in EVT input" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_henry_nr.py b/autotest/test_gwf_henry_nr.py index 908bb16305e..a0d3f65a0fe 100644 --- a/autotest/test_gwf_henry_nr.py +++ b/autotest/test_gwf_henry_nr.py @@ -233,10 +233,7 @@ def build_models(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): name = "gwf-henry-nr" test = TestFramework( diff --git a/autotest/test_gwf_ifmod_buy.py b/autotest/test_gwf_ifmod_buy.py index edfa3b99e8f..0f0bfa5df4d 100644 --- a/autotest/test_gwf_ifmod_buy.py +++ b/autotest/test_gwf_ifmod_buy.py @@ -639,10 +639,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) @pytest.mark.developmode def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( diff --git a/autotest/test_gwf_ifmod_idomain.py b/autotest/test_gwf_ifmod_idomain.py index 5db61d3eaa5..8f5ac4c18d0 100644 --- a/autotest/test_gwf_ifmod_idomain.py +++ b/autotest/test_gwf_ifmod_idomain.py @@ -373,10 +373,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) @pytest.mark.developmode def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( diff --git a/autotest/test_gwf_ifmod_mult_exg.py b/autotest/test_gwf_ifmod_mult_exg.py index 8ffd57cbf02..c5593f0b75e 100644 --- a/autotest/test_gwf_ifmod_mult_exg.py +++ b/autotest/test_gwf_ifmod_mult_exg.py @@ -329,10 +329,7 @@ def exact(x): # assert maxdiff_child_south > maxdiff_child_north -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) @pytest.mark.developmode def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( diff --git a/autotest/test_gwf_ifmod_newton.py b/autotest/test_gwf_ifmod_newton.py index 982c507815d..9ae844132e5 100644 --- a/autotest/test_gwf_ifmod_newton.py +++ b/autotest/test_gwf_ifmod_newton.py @@ -385,10 +385,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) @pytest.mark.developmode def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( diff --git a/autotest/test_gwf_ifmod_rewet.py b/autotest/test_gwf_ifmod_rewet.py index b3c751dd56f..42562768c17 100644 --- a/autotest/test_gwf_ifmod_rewet.py +++ b/autotest/test_gwf_ifmod_rewet.py @@ -406,10 +406,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) @pytest.mark.developmode def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( diff --git a/autotest/test_gwf_ifmod_vert.py b/autotest/test_gwf_ifmod_vert.py index 1e6a28cdad6..cf480fa2f9a 100644 --- a/autotest/test_gwf_ifmod_vert.py +++ b/autotest/test_gwf_ifmod_vert.py @@ -281,10 +281,7 @@ def check_output(idx, test): assert np.allclose(res, 0.0, atol=1.0e-6), errmsg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) @pytest.mark.developmode def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( diff --git a/autotest/test_gwf_ifmod_xt3d01.py b/autotest/test_gwf_ifmod_xt3d01.py index 31441bacbbf..2da24e89601 100644 --- a/autotest/test_gwf_ifmod_xt3d01.py +++ b/autotest/test_gwf_ifmod_xt3d01.py @@ -476,10 +476,7 @@ def exact(x): ), "boundname observations do not match expected results" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_ifmod_xt3d02.py b/autotest/test_gwf_ifmod_xt3d02.py index 70aff7e85a3..e4876486ae0 100644 --- a/autotest/test_gwf_ifmod_xt3d02.py +++ b/autotest/test_gwf_ifmod_xt3d02.py @@ -411,10 +411,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_ims_rcm_reorder.py b/autotest/test_gwf_ims_rcm_reorder.py index 54102029974..c5f39010094 100644 --- a/autotest/test_gwf_ims_rcm_reorder.py +++ b/autotest/test_gwf_ims_rcm_reorder.py @@ -137,10 +137,7 @@ def check_output(idx, test): b1.close() -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_lak_bedleak.py b/autotest/test_gwf_lak_bedleak.py index 97231d2c3ec..6a3a42d6830 100644 --- a/autotest/test_gwf_lak_bedleak.py +++ b/autotest/test_gwf_lak_bedleak.py @@ -166,10 +166,7 @@ def check_output(idx, test): assert np.allclose(r["q"][1], -6.19237994e-12) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_lak_wetlakbedarea01.py b/autotest/test_gwf_lak_wetlakbedarea01.py index ae7c6405c60..5a0043a0cc0 100644 --- a/autotest/test_gwf_lak_wetlakbedarea01.py +++ b/autotest/test_gwf_lak_wetlakbedarea01.py @@ -441,10 +441,7 @@ def check_output(idx, test): assert np.all(monotonicIncrease > 0), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_lak_wetlakbedarea02.py b/autotest/test_gwf_lak_wetlakbedarea02.py index ddb67bd887d..b72807e67df 100644 --- a/autotest/test_gwf_lak_wetlakbedarea02.py +++ b/autotest/test_gwf_lak_wetlakbedarea02.py @@ -398,10 +398,7 @@ def check_output(idx, test): assert np.isclose(warea, checks_out[ii], atol=1e-5), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_laket.py b/autotest/test_gwf_laket.py index 6f3d36f4b5d..91f00bd8d48 100644 --- a/autotest/test_gwf_laket.py +++ b/autotest/test_gwf_laket.py @@ -292,10 +292,7 @@ def check_output(idx, test): assert test.success, msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_libmf6_evt01.py b/autotest/test_gwf_libmf6_evt01.py index f822aa4dcda..067e7ac7ae4 100644 --- a/autotest/test_gwf_libmf6_evt01.py +++ b/autotest/test_gwf_libmf6_evt01.py @@ -250,10 +250,7 @@ def api_func(exe, idx, model_ws=None): return True, open(output_file_path).readlines() -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_libmf6_ghb01.py b/autotest/test_gwf_libmf6_ghb01.py index f4ec6ab5c01..4809b430c45 100644 --- a/autotest/test_gwf_libmf6_ghb01.py +++ b/autotest/test_gwf_libmf6_ghb01.py @@ -273,10 +273,7 @@ def api_func(exe, idx, model_ws=None): return True, open(output_file_path).readlines() -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_libmf6_ifmod01.py b/autotest/test_gwf_libmf6_ifmod01.py index dca210389ff..6ffe87935c3 100644 --- a/autotest/test_gwf_libmf6_ifmod01.py +++ b/autotest/test_gwf_libmf6_ifmod01.py @@ -303,10 +303,7 @@ def check_interface_models(mf6): ), "AREA in interface model does not match" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_libmf6_ifmod02.py b/autotest/test_gwf_libmf6_ifmod02.py index 71bf9f4dd30..b9f6462ddd3 100644 --- a/autotest/test_gwf_libmf6_ifmod02.py +++ b/autotest/test_gwf_libmf6_ifmod02.py @@ -401,10 +401,7 @@ def check_interface_models(mf6): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) @pytest.mark.developmode def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( diff --git a/autotest/test_gwf_libmf6_ifmod03.py b/autotest/test_gwf_libmf6_ifmod03.py index c35a38224a8..f5d24a342db 100644 --- a/autotest/test_gwf_libmf6_ifmod03.py +++ b/autotest/test_gwf_libmf6_ifmod03.py @@ -287,10 +287,7 @@ def check_interface_models(mf6): assert abs(ymax - ymin) < 1e-6 -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_libmf6_rch01.py b/autotest/test_gwf_libmf6_rch01.py index 30ff56b2ee9..b7ef4c50e6c 100644 --- a/autotest/test_gwf_libmf6_rch01.py +++ b/autotest/test_gwf_libmf6_rch01.py @@ -230,10 +230,7 @@ def api_func(exe, idx, model_ws=None): return True, open(output_file_path).readlines() -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_libmf6_rch02.py b/autotest/test_gwf_libmf6_rch02.py index eac72cebe44..fc1b4c6fdf9 100644 --- a/autotest/test_gwf_libmf6_rch02.py +++ b/autotest/test_gwf_libmf6_rch02.py @@ -305,10 +305,7 @@ def api_func(exe, idx, model_ws=None): return True, open(output_file_path).readlines() -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_libmf6_riv01.py b/autotest/test_gwf_libmf6_riv01.py index d6d86c1a3ba..ef42e2e29d7 100644 --- a/autotest/test_gwf_libmf6_riv01.py +++ b/autotest/test_gwf_libmf6_riv01.py @@ -246,10 +246,7 @@ def api_func(exe, idx, model_ws=None): return True, open(output_file_path).readlines() -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_libmf6_riv02.py b/autotest/test_gwf_libmf6_riv02.py index b2eb0a1e2dc..2f94f7717e5 100644 --- a/autotest/test_gwf_libmf6_riv02.py +++ b/autotest/test_gwf_libmf6_riv02.py @@ -271,10 +271,7 @@ def api_func(exe, idx, model_ws=None): return True, open(output_file_path).readlines() -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_libmf6_sto01.py b/autotest/test_gwf_libmf6_sto01.py index 923a6621bed..24283ffa3ee 100644 --- a/autotest/test_gwf_libmf6_sto01.py +++ b/autotest/test_gwf_libmf6_sto01.py @@ -207,10 +207,7 @@ def api_func(exe, idx, model_ws=None): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_maw01.py b/autotest/test_gwf_maw01.py index fcca9ab37e5..0a3b02ee57c 100644 --- a/autotest/test_gwf_maw01.py +++ b/autotest/test_gwf_maw01.py @@ -180,7 +180,7 @@ def check_output(workspace): print(msg) -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): ws = str(function_tmpdir) sim, _ = build_model(idx, ws, targets.mf6) diff --git a/autotest/test_gwf_maw02.py b/autotest/test_gwf_maw02.py index 76792c993a3..123f9278607 100644 --- a/autotest/test_gwf_maw02.py +++ b/autotest/test_gwf_maw02.py @@ -280,7 +280,7 @@ def eval_results(name, workspace): assert diffv < budtol, msg + f"diffv {diffv} exceeds tolerance {budtol}" -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): ws = str(function_tmpdir) sim, _ = build_model(idx, ws, targets.mf6) diff --git a/autotest/test_gwf_maw03.py b/autotest/test_gwf_maw03.py index 7bb1e752162..dcf364b02e7 100644 --- a/autotest/test_gwf_maw03.py +++ b/autotest/test_gwf_maw03.py @@ -205,7 +205,7 @@ def eval_results(name, workspace): assert tc["M1RATE"].min() < 800.0 and tc["M1HEAD"].max() < 1.0, msg -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): ws = str(function_tmpdir) sim = build_model(idx, ws, targets.mf6) diff --git a/autotest/test_gwf_maw05.py b/autotest/test_gwf_maw05.py index 960412930d0..a7de2550a66 100644 --- a/autotest/test_gwf_maw05.py +++ b/autotest/test_gwf_maw05.py @@ -240,10 +240,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_maw06.py b/autotest/test_gwf_maw06.py index 5e268baae93..d16b04135b2 100644 --- a/autotest/test_gwf_maw06.py +++ b/autotest/test_gwf_maw06.py @@ -279,10 +279,7 @@ def check_output(idx, test): assert np.allclose(qmaw, -qgwf), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_maw07.py b/autotest/test_gwf_maw07.py index 564dc971fe0..8ddede3585e 100644 --- a/autotest/test_gwf_maw07.py +++ b/autotest/test_gwf_maw07.py @@ -285,10 +285,7 @@ def check_output(idx, test): assert np.allclose(qmaw, -qgwf), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_maw08.py b/autotest/test_gwf_maw08.py index 8ba5e8ddee9..94e7dfa36f7 100644 --- a/autotest/test_gwf_maw08.py +++ b/autotest/test_gwf_maw08.py @@ -240,10 +240,7 @@ def eval_results(idx, test): assert np.allclose(qmaw, -qgwf), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_maw09.py b/autotest/test_gwf_maw09.py index 344bea13bb9..730e5cb0c8d 100644 --- a/autotest/test_gwf_maw09.py +++ b/autotest/test_gwf_maw09.py @@ -305,10 +305,7 @@ def check_output(idx, test): assert np.allclose(qmaw, -qgwf), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_maw10.py b/autotest/test_gwf_maw10.py index 989b82ea237..0ef9d13338e 100644 --- a/autotest/test_gwf_maw10.py +++ b/autotest/test_gwf_maw10.py @@ -261,10 +261,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_mf6io_app2_examples_distypes.py b/autotest/test_gwf_mf6io_app2_examples_distypes.py index 3c0bbe5e928..542b3e694f0 100644 --- a/autotest/test_gwf_mf6io_app2_examples_distypes.py +++ b/autotest/test_gwf_mf6io_app2_examples_distypes.py @@ -4,6 +4,7 @@ import numpy as np import pytest from flopy.utils.gridgen import Gridgen +from conftest import try_get_target from framework import TestFramework @@ -252,7 +253,8 @@ def build_rch_package(gwf, list_recharge): return rch -def build_models(idx, test, gridgen): +def build_models(idx, test): + gridgen = try_get_target(test.targets, "gridgen") return build_mf6(idx, test.workspace, gridgen), build_mf6( idx, test.workspace / "mf6", gridgen ) @@ -554,16 +556,13 @@ def check_output(idx, test): test._compare_budget_files(extension, fpth0, fpth1) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, workspace=function_tmpdir, targets=targets, - build=lambda t: build_models(idx, t, targets.gridgen), + build=lambda t: build_models(idx, t), check=lambda t: check_output(idx, t), verbose=False, ) diff --git a/autotest/test_gwf_multimvr.py b/autotest/test_gwf_multimvr.py index 5ed96406bd8..f85ce24ce7f 100644 --- a/autotest/test_gwf_multimvr.py +++ b/autotest/test_gwf_multimvr.py @@ -1117,10 +1117,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_mvr01.py b/autotest/test_gwf_mvr01.py index 3cb33e80ed2..0913dbc40c2 100644 --- a/autotest/test_gwf_mvr01.py +++ b/autotest/test_gwf_mvr01.py @@ -444,10 +444,7 @@ def check_output(idx, test): assert records[24].shape == (0,) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_newton01.py b/autotest/test_gwf_newton01.py index 763a62d48b2..e184e92da20 100644 --- a/autotest/test_gwf_newton01.py +++ b/autotest/test_gwf_newton01.py @@ -108,10 +108,7 @@ def check_output(idx, test): assert np.allclose(v["H2"], 7.0), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_newton_under_relaxation.py b/autotest/test_gwf_newton_under_relaxation.py index e1a977a46a1..9fedb1875a8 100644 --- a/autotest/test_gwf_newton_under_relaxation.py +++ b/autotest/test_gwf_newton_under_relaxation.py @@ -123,10 +123,7 @@ def check_output(idx, test): assert np.allclose(base_heads, heads), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_noptc01.py b/autotest/test_gwf_noptc01.py index 0caa3e32dfd..19be84d2512 100644 --- a/autotest/test_gwf_noptc01.py +++ b/autotest/test_gwf_noptc01.py @@ -133,10 +133,7 @@ def build_models(idx, test): return sim, mc -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_npf01_75x75.py b/autotest/test_gwf_npf01_75x75.py index 5c3f0b228bc..277dd994139 100644 --- a/autotest/test_gwf_npf01_75x75.py +++ b/autotest/test_gwf_npf01_75x75.py @@ -13,7 +13,7 @@ sy = [0.1, 0.0] -def build_models(idx, test, targets): +def build_models(idx, test): nlay, nrow, ncol = 1, 75, 75 nper = 3 perlen = [1.0, 1000.0, 1.0] @@ -149,7 +149,7 @@ def build_models(idx, test, targets): # build MODFLOW-2005 files ws = os.path.join(test.workspace, "mf2005") - mc = flopy.modflow.Modflow(name, model_ws=ws, exe_name=targets.mf2005) + mc = flopy.modflow.Modflow(name, model_ws=ws, exe_name=test.targets.mf2005) dis = flopy.modflow.ModflowDis( mc, nlay=nlay, @@ -190,15 +190,12 @@ def build_models(idx, test, targets): return sim, mc -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, workspace=function_tmpdir, targets=targets, - build=lambda t: build_models(idx, t, targets), + build=lambda t: build_models(idx, t), ) test.run() diff --git a/autotest/test_gwf_npf02_rewet.py b/autotest/test_gwf_npf02_rewet.py index d46ede69a59..ad448eb8e24 100644 --- a/autotest/test_gwf_npf02_rewet.py +++ b/autotest/test_gwf_npf02_rewet.py @@ -334,10 +334,7 @@ def check_output(idx, test): print(" " + msg) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_npf03_sfr.py b/autotest/test_gwf_npf03_sfr.py index 77d1a5b2469..3e19037b510 100644 --- a/autotest/test_gwf_npf03_sfr.py +++ b/autotest/test_gwf_npf03_sfr.py @@ -5776,10 +5776,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_npf04_spdis.py b/autotest/test_gwf_npf04_spdis.py index a2d73bb2acc..22577cccb91 100644 --- a/autotest/test_gwf_npf04_spdis.py +++ b/autotest/test_gwf_npf04_spdis.py @@ -207,10 +207,7 @@ def check_output(idx, test): assert np.allclose(res, 0.0, atol=1.0e-6), errmsg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_npf05_anisotropy.py b/autotest/test_gwf_npf05_anisotropy.py index 932a3b554fd..221c086f41c 100644 --- a/autotest/test_gwf_npf05_anisotropy.py +++ b/autotest/test_gwf_npf05_anisotropy.py @@ -144,10 +144,7 @@ def check_output(idx, test): assert np.allclose(heads.flatten(), answer) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_npf_thickstrt.py b/autotest/test_gwf_npf_thickstrt.py index 3f7db7792d1..28d6362a48e 100644 --- a/autotest/test_gwf_npf_thickstrt.py +++ b/autotest/test_gwf_npf_thickstrt.py @@ -209,10 +209,7 @@ def check_output(idx, test): ), "simulated flow does not match with known solution." -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_npf_tvk01.py b/autotest/test_gwf_npf_tvk01.py index d4f67dce97b..530da8314c4 100644 --- a/autotest/test_gwf_npf_tvk01.py +++ b/autotest/test_gwf_npf_tvk01.py @@ -175,10 +175,7 @@ def check_output(idx, test): ), f"Expected flow rate {flow_rate_calc} but found {q}" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_npf_tvk02.py b/autotest/test_gwf_npf_tvk02.py index 0175bddaf17..d0f36cdc7e2 100644 --- a/autotest/test_gwf_npf_tvk02.py +++ b/autotest/test_gwf_npf_tvk02.py @@ -197,10 +197,7 @@ def check_output(idx, test): ), f"Expected head {expected_result} in period {kper} but found {h}" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_npf_tvk03.py b/autotest/test_gwf_npf_tvk03.py index 4494932f876..99bb445f171 100644 --- a/autotest/test_gwf_npf_tvk03.py +++ b/autotest/test_gwf_npf_tvk03.py @@ -197,10 +197,7 @@ def check_output(idx, test): ), f"Expected head {expected_result} in period {kper} but found {h}" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_npf_tvk04.py b/autotest/test_gwf_npf_tvk04.py index 55efe755dcc..5168b42a643 100644 --- a/autotest/test_gwf_npf_tvk04.py +++ b/autotest/test_gwf_npf_tvk04.py @@ -182,10 +182,7 @@ def check_output(idx, test): assert 2.0 * sp_x[0][8] < sp_x[1][8], errmsg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_npf_tvk05.py b/autotest/test_gwf_npf_tvk05.py index 915b4dab4e8..d0347b7f913 100644 --- a/autotest/test_gwf_npf_tvk05.py +++ b/autotest/test_gwf_npf_tvk05.py @@ -183,10 +183,7 @@ def check_output(idx, test): assert sp_x[0][8] == sp_x[1][8], errmsg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_obs01.py b/autotest/test_gwf_obs01.py index e9d11ffc706..ac69e386f3d 100644 --- a/autotest/test_gwf_obs01.py +++ b/autotest/test_gwf_obs01.py @@ -147,10 +147,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_obs02.py b/autotest/test_gwf_obs02.py index 0f3527c0536..4af6330f91a 100644 --- a/autotest/test_gwf_obs02.py +++ b/autotest/test_gwf_obs02.py @@ -150,10 +150,7 @@ def check_output(idx, test): ), "headcsv not equal head from binary file" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_pertim.py b/autotest/test_gwf_pertim.py index cbdcf8fc824..0e02c57ed43 100644 --- a/autotest/test_gwf_pertim.py +++ b/autotest/test_gwf_pertim.py @@ -130,10 +130,7 @@ def check_output(idx, test): ), f"CHD2_OUT <> {q_out} ({q_out_sim})" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_ptc01.py b/autotest/test_gwf_ptc01.py index 4142042955f..2e58b9c14da 100644 --- a/autotest/test_gwf_ptc01.py +++ b/autotest/test_gwf_ptc01.py @@ -138,10 +138,7 @@ def build_models(idx, test): return sim, mc -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_rch01.py b/autotest/test_gwf_rch01.py index c2f60e5f70a..c3c1947538b 100644 --- a/autotest/test_gwf_rch01.py +++ b/autotest/test_gwf_rch01.py @@ -137,10 +137,7 @@ def check_output(idx, test): heads = hobj.get_alldata() -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_rch02.py b/autotest/test_gwf_rch02.py index 413ce76f1f4..3decd75cb36 100644 --- a/autotest/test_gwf_rch02.py +++ b/autotest/test_gwf_rch02.py @@ -129,10 +129,7 @@ def check_output(idx, test): heads = hobj.get_alldata() -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_rch03.py b/autotest/test_gwf_rch03.py index 278e0d5f2be..e8e608e407c 100644 --- a/autotest/test_gwf_rch03.py +++ b/autotest/test_gwf_rch03.py @@ -155,10 +155,7 @@ def check_output(idx, test): heads = hobj.get_alldata() -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_sfr01gwfgwf.py b/autotest/test_gwf_sfr01gwfgwf.py index 796749a4e6a..7878725a6af 100644 --- a/autotest/test_gwf_sfr01gwfgwf.py +++ b/autotest/test_gwf_sfr01gwfgwf.py @@ -299,10 +299,7 @@ def check_output(idx, test): assert np.allclose(single_stage, stage), "sfr stages are not equal" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_sfr_badfactor.py b/autotest/test_gwf_sfr_badfactor.py index ec70cfa3689..f55eb08bc4d 100644 --- a/autotest/test_gwf_sfr_badfactor.py +++ b/autotest/test_gwf_sfr_badfactor.py @@ -524,7 +524,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_sfr_diversion.py b/autotest/test_gwf_sfr_diversion.py index c88b4112ddc..4ca34d74bd0 100644 --- a/autotest/test_gwf_sfr_diversion.py +++ b/autotest/test_gwf_sfr_diversion.py @@ -167,7 +167,7 @@ def check_output(idx, test): ), "Large mass balance error in SFR" -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_sfr_evap.py b/autotest/test_gwf_sfr_evap.py index ba4f1301f11..3b820d6b101 100644 --- a/autotest/test_gwf_sfr_evap.py +++ b/autotest/test_gwf_sfr_evap.py @@ -432,10 +432,7 @@ def check_output(idx, test): assert np.allclose(stored_strm_evap_r, sim_evap_r, atol=1e-4), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_sfr_npoint01.py b/autotest/test_gwf_sfr_npoint01.py index e1afa0fa38e..7d654809633 100644 --- a/autotest/test_gwf_sfr_npoint01.py +++ b/autotest/test_gwf_sfr_npoint01.py @@ -323,10 +323,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_sfr_npoint02.py b/autotest/test_gwf_sfr_npoint02.py index 2310c9a0bf4..ee987d1ae5d 100644 --- a/autotest/test_gwf_sfr_npoint02.py +++ b/autotest/test_gwf_sfr_npoint02.py @@ -239,10 +239,7 @@ def check_output(idx, test): ), "sfr depth not equal to calculated depth" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_sfr_npoint03.py b/autotest/test_gwf_sfr_npoint03.py index decdedd47f2..00eaecdec3d 100644 --- a/autotest/test_gwf_sfr_npoint03.py +++ b/autotest/test_gwf_sfr_npoint03.py @@ -295,10 +295,7 @@ def check_output(idx, test): ), f"upstream depths are not equal ('{test.name}')" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_sfr_reorder.py b/autotest/test_gwf_sfr_reorder.py index fab5341880a..5aafcf3b7a4 100644 --- a/autotest/test_gwf_sfr_reorder.py +++ b/autotest/test_gwf_sfr_reorder.py @@ -235,10 +235,7 @@ def check_output(idx, test): ), "DAG did not correctly reorder reaches." -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_sfr_wetstrmbedarea.py b/autotest/test_gwf_sfr_wetstrmbedarea.py index 190089717a7..d3143f29bbe 100644 --- a/autotest/test_gwf_sfr_wetstrmbedarea.py +++ b/autotest/test_gwf_sfr_wetstrmbedarea.py @@ -375,10 +375,7 @@ def check_output(idx, test): assert val == 0.0, msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_sto01.py b/autotest/test_gwf_sto01.py index 8f849130259..98a9b2338a7 100644 --- a/autotest/test_gwf_sto01.py +++ b/autotest/test_gwf_sto01.py @@ -96,7 +96,7 @@ # variant SUB package problem 3 -def build_models(idx, test, targets): +def build_models(idx, test): name = cases[idx] # build MODFLOW 6 files @@ -203,7 +203,7 @@ def build_models(idx, test, targets): cpth = cmppth ws = os.path.join(test.workspace, cpth) mc = flopy.modflow.Modflow( - name, model_ws=ws, version=cpth, exe_name=targets.mfnwt + name, model_ws=ws, version=cpth, exe_name=test.targets.mfnwt ) dis = flopy.modflow.ModflowDis( mc, @@ -337,15 +337,12 @@ def check_output(idx, test): print(" " + msg) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, workspace=function_tmpdir, - build=lambda t: build_models(idx, t, targets), + build=lambda t: build_models(idx, t), check=lambda t: check_output(idx, t), targets=targets, htol=htol[idx], diff --git a/autotest/test_gwf_sto02.py b/autotest/test_gwf_sto02.py index 8df83030bc2..da1d9f355ad 100644 --- a/autotest/test_gwf_sto02.py +++ b/autotest/test_gwf_sto02.py @@ -155,10 +155,7 @@ def check_output(idx, test): print(inc) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_sto03.py b/autotest/test_gwf_sto03.py index b8f3673c80d..4e0c078ed84 100644 --- a/autotest/test_gwf_sto03.py +++ b/autotest/test_gwf_sto03.py @@ -258,10 +258,7 @@ def check_output(idx, test): assert max_diff.sum() == 0.0, "simulated storage is not the same" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_sto_tvs01.py b/autotest/test_gwf_sto_tvs01.py index 041e49e35af..7ab1ada5646 100644 --- a/autotest/test_gwf_sto_tvs01.py +++ b/autotest/test_gwf_sto_tvs01.py @@ -197,10 +197,7 @@ def check_output(idx, test): ), f"Expected head {expected_result} in period {kper} but found {h}" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_ts_lak01.py b/autotest/test_gwf_ts_lak01.py index f674babfe43..84b658c65c8 100644 --- a/autotest/test_gwf_ts_lak01.py +++ b/autotest/test_gwf_ts_lak01.py @@ -351,10 +351,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_ts_maw01.py b/autotest/test_gwf_ts_maw01.py index 2d5b9079b4c..c752f71ce60 100644 --- a/autotest/test_gwf_ts_maw01.py +++ b/autotest/test_gwf_ts_maw01.py @@ -451,10 +451,7 @@ def check_output(idx, test): eval_bud_diff(fpth, cobj0, cobj1) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_ts_sfr01.py b/autotest/test_gwf_ts_sfr01.py index e5878220fbf..1401b2da1ec 100644 --- a/autotest/test_gwf_ts_sfr01.py +++ b/autotest/test_gwf_ts_sfr01.py @@ -592,10 +592,7 @@ def check_result(idx, test): assert np.allclose(v0, check), "FROM-MVR failed" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_ts_sfr02.py b/autotest/test_gwf_ts_sfr02.py index a8ff798913c..7160f6279a8 100644 --- a/autotest/test_gwf_ts_sfr02.py +++ b/autotest/test_gwf_ts_sfr02.py @@ -598,10 +598,7 @@ def check_output(idx, test): assert np.allclose(v0, check), "TO-MVR failed" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_ts_uzf01.py b/autotest/test_gwf_ts_uzf01.py index 4c07b9bdd78..5434bb2c165 100644 --- a/autotest/test_gwf_ts_uzf01.py +++ b/autotest/test_gwf_ts_uzf01.py @@ -689,10 +689,7 @@ def check_output(idx, test): eval_bud_diff(fpth, cobj0, cobj1) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_utl01_binaryinput.py b/autotest/test_gwf_utl01_binaryinput.py index 4e90a674b20..ad5df3aa573 100644 --- a/autotest/test_gwf_utl01_binaryinput.py +++ b/autotest/test_gwf_utl01_binaryinput.py @@ -428,10 +428,7 @@ def build_models(idx, test): return sim, None -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_utl02_timeseries.py b/autotest/test_gwf_utl02_timeseries.py index d0c5808a51b..cc37b394d5a 100644 --- a/autotest/test_gwf_utl02_timeseries.py +++ b/autotest/test_gwf_utl02_timeseries.py @@ -147,10 +147,7 @@ def build_models(idx, test): return sim, None -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_utl03_obs01.py b/autotest/test_gwf_utl03_obs01.py index e2badc32ec9..85f0c504b5b 100644 --- a/autotest/test_gwf_utl03_obs01.py +++ b/autotest/test_gwf_utl03_obs01.py @@ -48,13 +48,11 @@ hclose, rclose, relax = 1e-6, 0.01, 1.0 -def build_mf6(idx, ws, exe, binaryobs=True): +def build_mf6(idx, ws, binaryobs=True): name = cases[idx] # build MODFLOW 6 files - sim = flopy.mf6.MFSimulation( - sim_name=name, version="mf6", exe_name=exe, sim_ws=ws - ) + sim = flopy.mf6.MFSimulation(sim_name=name, version="mf6", sim_ws=ws) # create tdis package flopy.mf6.ModflowTdis( sim, time_units="DAYS", nper=nper, perioddata=tdis_rc @@ -137,14 +135,14 @@ def build_mf6(idx, ws, exe, binaryobs=True): return sim -def build_model(idx, dir, exe): +def build_model(idx, dir): ws = dir # build mf6 with ascii observation output - sim = build_mf6(idx, ws, exe=exe, binaryobs=False) + sim = build_mf6(idx, ws, binaryobs=False) # build mf6 with binary observation output wsc = os.path.join(ws, "mf6") - mc = build_mf6(idx, wsc, exe=exe, binaryobs=True) + mc = build_mf6(idx, wsc, binaryobs=True) sim.write_simulation() mc.write_simulation() @@ -153,8 +151,8 @@ def build_model(idx, dir, exe): return sim, mc -def build_models(idx, test, exe): - sim, mc = build_model(idx, test.workspace, exe) +def build_models(idx, test): + sim, mc = build_model(idx, test.workspace) sim.write_simulation() mc.write_simulation() hack_binary_obs(idx, test.workspace) @@ -213,15 +211,12 @@ def check_output(idx, test): assert np.allclose(d0[name], d1[name], rtol=1e-5), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, workspace=function_tmpdir, - build=lambda t: build_models(idx, t, targets.mf6), + build=lambda t: build_models(idx, t), check=lambda t: check_output(idx, t), targets=targets, overwrite=False, diff --git a/autotest/test_gwf_utl04_auxmult.py b/autotest/test_gwf_utl04_auxmult.py index 9e89779cb53..e7ff22c1114 100644 --- a/autotest/test_gwf_utl04_auxmult.py +++ b/autotest/test_gwf_utl04_auxmult.py @@ -173,10 +173,7 @@ def check_output(idx, test): assert np.allclose(qlist, answer), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_utl05_budparse.py b/autotest/test_gwf_utl05_budparse.py index 8410dbba2ce..99001a76ab3 100644 --- a/autotest/test_gwf_utl05_budparse.py +++ b/autotest/test_gwf_utl05_budparse.py @@ -155,10 +155,7 @@ def check_output(idx, test): assert np.allclose(inc["WEL_OUT"], 0.0) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_utl06_tas.py b/autotest/test_gwf_utl06_tas.py index 20f1b722058..17ca4fc279e 100644 --- a/autotest/test_gwf_utl06_tas.py +++ b/autotest/test_gwf_utl06_tas.py @@ -360,10 +360,7 @@ def check_output(idx, test): assert np.allclose(q, qa), f"{q} /=\n {qa}" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_uzf01.py b/autotest/test_gwf_uzf01.py index 7811bd27946..d269ab11f01 100644 --- a/autotest/test_gwf_uzf01.py +++ b/autotest/test_gwf_uzf01.py @@ -258,10 +258,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_uzf02.py b/autotest/test_gwf_uzf02.py index 8eb402dee98..57d40316d9f 100644 --- a/autotest/test_gwf_uzf02.py +++ b/autotest/test_gwf_uzf02.py @@ -302,10 +302,7 @@ def check_output(idx, test): # make_plot(sim, obsvals) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_uzf03.py b/autotest/test_gwf_uzf03.py index 8c64728e5dc..77c5e8c76a1 100644 --- a/autotest/test_gwf_uzf03.py +++ b/autotest/test_gwf_uzf03.py @@ -303,10 +303,7 @@ def check_output(idx, test): # make_plot(test, obsvals) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_uzf04.py b/autotest/test_gwf_uzf04.py index 23098286d75..b53cf7627db 100644 --- a/autotest/test_gwf_uzf04.py +++ b/autotest/test_gwf_uzf04.py @@ -253,10 +253,7 @@ def check_output(idx, test): ), "Simulated mobile water volume in aux does not match known result" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_uzf05.py b/autotest/test_gwf_uzf05.py index aa71c12eebe..4393f4f43e9 100644 --- a/autotest/test_gwf_uzf05.py +++ b/autotest/test_gwf_uzf05.py @@ -235,10 +235,7 @@ def check_output(idx, test): assert np.isclose(q, -4.0), "Flow from UZF to node 1 should be -4." -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_uzf_wc_output.py b/autotest/test_gwf_uzf_wc_output.py index d529bae4a82..b27d978674c 100644 --- a/autotest/test_gwf_uzf_wc_output.py +++ b/autotest/test_gwf_uzf_wc_output.py @@ -536,10 +536,7 @@ def check_output(idx, test): print("Finished running checks") -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_vsc01.py b/autotest/test_gwf_vsc01.py index d80528a0bd2..4abc3c1bf80 100644 --- a/autotest/test_gwf_vsc01.py +++ b/autotest/test_gwf_vsc01.py @@ -320,10 +320,7 @@ def check_output(idx, test): print("Binary viscosity output file was not read successfully") -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_vsc02.py b/autotest/test_gwf_vsc02.py index 799b410a3cb..3598a10cb4a 100644 --- a/autotest/test_gwf_vsc02.py +++ b/autotest/test_gwf_vsc02.py @@ -309,10 +309,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_vsc03_sfr.py b/autotest/test_gwf_vsc03_sfr.py index 4caf2f97853..44a1b7bebe7 100644 --- a/autotest/test_gwf_vsc03_sfr.py +++ b/autotest/test_gwf_vsc03_sfr.py @@ -523,10 +523,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_vsc04_lak.py b/autotest/test_gwf_vsc04_lak.py index 0b15c779889..af738585aee 100644 --- a/autotest/test_gwf_vsc04_lak.py +++ b/autotest/test_gwf_vsc04_lak.py @@ -769,10 +769,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_vsc05_hfb.py b/autotest/test_gwf_vsc05_hfb.py index 878f7ef9140..16d62c121a9 100644 --- a/autotest/test_gwf_vsc05_hfb.py +++ b/autotest/test_gwf_vsc05_hfb.py @@ -362,10 +362,7 @@ def check_output(idx, test): # - No need to change any code below -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_wel01.py b/autotest/test_gwf_wel01.py index 4b573143ff0..f1984e99300 100644 --- a/autotest/test_gwf_wel01.py +++ b/autotest/test_gwf_wel01.py @@ -186,10 +186,7 @@ def check_output(idx, test): assert np.allclose(a1, a2), errmsg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwf_zb01.py b/autotest/test_gwf_zb01.py index 47071a63214..40e138d26bd 100644 --- a/autotest/test_gwf_zb01.py +++ b/autotest/test_gwf_zb01.py @@ -1,5 +1,4 @@ import os -from pathlib import Path import flopy import numpy as np @@ -217,7 +216,7 @@ def build_models(idx, test): return sim, None -def check_output(idx, test, zb6): +def check_output(idx, test): # build zonebudget files zones = [-1000000, 1000000, 9999999] nzones = len(zones) @@ -240,7 +239,7 @@ def check_output(idx, test, zb6): # run zonebudget success, buff = flopy.run_model( - zb6, + test.targets.zbud6, "zonebudget.nam", model_ws=test.workspace, silent=False, @@ -385,17 +384,14 @@ def check_output(idx, test, zb6): print(" " + msg) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, workspace=function_tmpdir, targets=targets, build=lambda t: build_models(idx, t), - check=lambda t: check_output(idx, t, targets.zbud6), + check=lambda t: check_output(idx, t), htol=htol[idx], ) test.run() diff --git a/autotest/test_gwfgwf_lgr.py b/autotest/test_gwfgwf_lgr.py index 067d8df3146..6292114b406 100644 --- a/autotest/test_gwfgwf_lgr.py +++ b/autotest/test_gwfgwf_lgr.py @@ -275,10 +275,7 @@ def check_output(idx, test): assert np.allclose(res, 0.0, atol=1.0e-6), errmsg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) @pytest.mark.developmode def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( diff --git a/autotest/test_gwt_adv01.py b/autotest/test_gwt_adv01.py index 96550904a41..62c41a4649d 100644 --- a/autotest/test_gwt_adv01.py +++ b/autotest/test_gwt_adv01.py @@ -585,10 +585,7 @@ def check_output(idx, test): ), "simulated concentrations do not match with known solution." -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_adv01_fmi.py b/autotest/test_gwt_adv01_fmi.py index 576e42917a8..d40dd4cf7b1 100644 --- a/autotest/test_gwt_adv01_fmi.py +++ b/autotest/test_gwt_adv01_fmi.py @@ -561,10 +561,7 @@ def check_output(idx, test): ), "simulated concentrations do not match with known solution." -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_adv01_gwtgwt.py b/autotest/test_gwt_adv01_gwtgwt.py index 9dda6f035c7..f003beb121e 100644 --- a/autotest/test_gwt_adv01_gwtgwt.py +++ b/autotest/test_gwt_adv01_gwtgwt.py @@ -719,10 +719,7 @@ def check_output(idx, test): # assert np.allclose(res, 0.0, atol=1.0e-6), errmsg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) @pytest.mark.developmode def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( diff --git a/autotest/test_gwt_adv02.py b/autotest/test_gwt_adv02.py index 6485fca8cda..1252d353ce9 100644 --- a/autotest/test_gwt_adv02.py +++ b/autotest/test_gwt_adv02.py @@ -938,10 +938,7 @@ def check_output(idx, test): ), "simulated concentrations do not match with known solution." -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_adv03.py b/autotest/test_gwt_adv03.py index 4c76191b2fc..562e2567b43 100644 --- a/autotest/test_gwt_adv03.py +++ b/autotest/test_gwt_adv03.py @@ -490,10 +490,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_adv04.py b/autotest/test_gwt_adv04.py index aaec75aab33..40d1b76ff25 100644 --- a/autotest/test_gwt_adv04.py +++ b/autotest/test_gwt_adv04.py @@ -253,10 +253,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_buy_solute_heat.py b/autotest/test_gwt_buy_solute_heat.py index 0ef00027b38..d8f4c52740a 100644 --- a/autotest/test_gwt_buy_solute_heat.py +++ b/autotest/test_gwt_buy_solute_heat.py @@ -458,10 +458,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_disu01.py b/autotest/test_gwt_disu01.py index 56ddb462613..1a457e402a7 100644 --- a/autotest/test_gwt_disu01.py +++ b/autotest/test_gwt_disu01.py @@ -246,10 +246,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_dsp01.py b/autotest/test_gwt_dsp01.py index ea98fbd7924..871871c89c5 100644 --- a/autotest/test_gwt_dsp01.py +++ b/autotest/test_gwt_dsp01.py @@ -381,10 +381,7 @@ def check_output(idx, test): assert np.allclose(gwtobs["FLOW1"], -cncobs["CNC000"]), errmsg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_dsp01_fmi.py b/autotest/test_gwt_dsp01_fmi.py index d7b36250ac8..8c09530efab 100644 --- a/autotest/test_gwt_dsp01_fmi.py +++ b/autotest/test_gwt_dsp01_fmi.py @@ -318,10 +318,7 @@ def check_output(idx, test): ), "simulated concentrations do not match with known solution." -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_dsp01_gwtgwt.py b/autotest/test_gwt_dsp01_gwtgwt.py index 316c8df4c8d..912bbdcf329 100644 --- a/autotest/test_gwt_dsp01_gwtgwt.py +++ b/autotest/test_gwt_dsp01_gwtgwt.py @@ -296,10 +296,7 @@ def check_output(idx, test): assert abs(np.sum(conc1) + np.sum(conc2) - 100.0) < 1e-6 -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) @pytest.mark.developmode def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( diff --git a/autotest/test_gwt_dsp01_noadv.py b/autotest/test_gwt_dsp01_noadv.py index d41ded2a7c6..f7577b073af 100644 --- a/autotest/test_gwt_dsp01_noadv.py +++ b/autotest/test_gwt_dsp01_noadv.py @@ -262,10 +262,7 @@ def check_output(idx, test): ), "simulated concentrations do not match with known solution." -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_dsp02.py b/autotest/test_gwt_dsp02.py index 3be9284fb8e..192cafc8367 100644 --- a/autotest/test_gwt_dsp02.py +++ b/autotest/test_gwt_dsp02.py @@ -709,10 +709,7 @@ def check_output(idx, test): ), "simulated concentrations do not match with known solution." -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_dsp03.py b/autotest/test_gwt_dsp03.py index 5f718bd2796..7714e1e1f87 100644 --- a/autotest/test_gwt_dsp03.py +++ b/autotest/test_gwt_dsp03.py @@ -436,10 +436,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_dsp04.py b/autotest/test_gwt_dsp04.py index ecdd5751645..ab14cfb8022 100644 --- a/autotest/test_gwt_dsp04.py +++ b/autotest/test_gwt_dsp04.py @@ -249,10 +249,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_dsp05_noadv.py b/autotest/test_gwt_dsp05_noadv.py index 3768c2ffad1..e5a2f0675f8 100644 --- a/autotest/test_gwt_dsp05_noadv.py +++ b/autotest/test_gwt_dsp05_noadv.py @@ -157,10 +157,7 @@ def check_output(idx, test): assert np.allclose(cres, conc.flatten()), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_fmi01.py b/autotest/test_gwt_fmi01.py index 9f479e217ce..93d6a344b06 100644 --- a/autotest/test_gwt_fmi01.py +++ b/autotest/test_gwt_fmi01.py @@ -189,10 +189,7 @@ def check_output(idx, test): assert np.allclose(cres, conc), errmsg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_henry.py b/autotest/test_gwt_henry.py index 082e600a5f9..2bbc4b71fc9 100644 --- a/autotest/test_gwt_henry.py +++ b/autotest/test_gwt_henry.py @@ -286,10 +286,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_henry_gwtgwt.py b/autotest/test_gwt_henry_gwtgwt.py index cf69338ebbe..b15216b3efa 100644 --- a/autotest/test_gwt_henry_gwtgwt.py +++ b/autotest/test_gwt_henry_gwtgwt.py @@ -426,10 +426,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_henry_nr.py b/autotest/test_gwt_henry_nr.py index 242921e99ab..e7dac23d84e 100644 --- a/autotest/test_gwt_henry_nr.py +++ b/autotest/test_gwt_henry_nr.py @@ -527,10 +527,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_henry_openclose.py b/autotest/test_gwt_henry_openclose.py index 423e39a0061..bdc1c6e3725 100644 --- a/autotest/test_gwt_henry_openclose.py +++ b/autotest/test_gwt_henry_openclose.py @@ -289,10 +289,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_ims_issue655.py b/autotest/test_gwt_ims_issue655.py index 66644b0b2df..7cbb8b42122 100644 --- a/autotest/test_gwt_ims_issue655.py +++ b/autotest/test_gwt_ims_issue655.py @@ -289,10 +289,7 @@ def check_output(idx, test): # vold = v -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_ist01.py b/autotest/test_gwt_ist01.py index 0977f24969d..b9fd366206c 100644 --- a/autotest/test_gwt_ist01.py +++ b/autotest/test_gwt_ist01.py @@ -263,10 +263,7 @@ def check_output(idx, test): assert np.allclose(rate_sim, rate_calc), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_ist02.py b/autotest/test_gwt_ist02.py index 83b2e492700..17cb6741890 100644 --- a/autotest/test_gwt_ist02.py +++ b/autotest/test_gwt_ist02.py @@ -376,10 +376,7 @@ def check_output(idx, test): assert success, "Conc difference between mf6 and mt3d > 0.05" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_lkt01.py b/autotest/test_gwt_lkt01.py index de0545da538..f066f47b394 100644 --- a/autotest/test_gwt_lkt01.py +++ b/autotest/test_gwt_lkt01.py @@ -430,10 +430,7 @@ def check_output(idx, test): assert np.allclose(res, answer), f"{res} {answer}" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_lkt02.py b/autotest/test_gwt_lkt02.py index a04e2ba7c58..a4368b16f95 100644 --- a/autotest/test_gwt_lkt02.py +++ b/autotest/test_gwt_lkt02.py @@ -483,10 +483,7 @@ def check_output(idx, test): assert np.allclose(res[dtname], answer[dtname]), f"{res} {answer}" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_lkt03.py b/autotest/test_gwt_lkt03.py index 422ccf2c9a8..43272fda679 100644 --- a/autotest/test_gwt_lkt03.py +++ b/autotest/test_gwt_lkt03.py @@ -379,10 +379,7 @@ def check_output(idx, test): assert np.allclose(res[dtname], answer[dtname]), f"{res} {answer}" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_lkt04.py b/autotest/test_gwt_lkt04.py index 891d4b037b3..bc90cd82ab0 100644 --- a/autotest/test_gwt_lkt04.py +++ b/autotest/test_gwt_lkt04.py @@ -470,10 +470,7 @@ def check_output(idx, test): assert np.allclose(res, answer), f"{res} {answer}" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_moc3d01.py b/autotest/test_gwt_moc3d01.py index e3a86d7f2ea..27deccbff9e 100644 --- a/autotest/test_gwt_moc3d01.py +++ b/autotest/test_gwt_moc3d01.py @@ -349,10 +349,7 @@ def check_output(idx, test): ), "simulated concentrations do not match with known solution." -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_moc3d01_zod.py b/autotest/test_gwt_moc3d01_zod.py index 6f730d84bf0..70d1733e87a 100644 --- a/autotest/test_gwt_moc3d01_zod.py +++ b/autotest/test_gwt_moc3d01_zod.py @@ -569,10 +569,7 @@ def check_output(idx, test): assert np.allclose(tsres, tssim), errmsg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_moc3d02.py b/autotest/test_gwt_moc3d02.py index df6e53ae79a..729cdcba760 100644 --- a/autotest/test_gwt_moc3d02.py +++ b/autotest/test_gwt_moc3d02.py @@ -308,10 +308,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_moc3d03.py b/autotest/test_gwt_moc3d03.py index 5cd575e5c9c..cedfebfdf8e 100644 --- a/autotest/test_gwt_moc3d03.py +++ b/autotest/test_gwt_moc3d03.py @@ -290,10 +290,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_mst01.py b/autotest/test_gwt_mst01.py index 2fc2aea7f82..2eadf4b2036 100644 --- a/autotest/test_gwt_mst01.py +++ b/autotest/test_gwt_mst01.py @@ -230,10 +230,7 @@ def check_output(idx, test): ) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_mst02.py b/autotest/test_gwt_mst02.py index 83fe51eed42..8a7ee63d18c 100644 --- a/autotest/test_gwt_mst02.py +++ b/autotest/test_gwt_mst02.py @@ -253,10 +253,7 @@ def check_output(idx, test): assert False, f'could not load data from "{fpth}"' -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_mst03.py b/autotest/test_gwt_mst03.py index 7f5e9c26ca0..20c90911186 100644 --- a/autotest/test_gwt_mst03.py +++ b/autotest/test_gwt_mst03.py @@ -281,10 +281,7 @@ def check_output(idx, test): assert np.allclose(conc, canswer, atol=1.0e-8), errmsg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_mst04_noadv.py b/autotest/test_gwt_mst04_noadv.py index c309df9c178..9e438805627 100644 --- a/autotest/test_gwt_mst04_noadv.py +++ b/autotest/test_gwt_mst04_noadv.py @@ -121,10 +121,7 @@ def check_output(idx, test): assert np.allclose(cres, conc.flatten()), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_mst05.py b/autotest/test_gwt_mst05.py index e2b857924e5..dba4a1975b7 100644 --- a/autotest/test_gwt_mst05.py +++ b/autotest/test_gwt_mst05.py @@ -304,10 +304,7 @@ def check_output(idx, test): plt.savefig(fname) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_mst06_noadv.py b/autotest/test_gwt_mst06_noadv.py index 0100f5e66f7..b2fef2ad877 100644 --- a/autotest/test_gwt_mst06_noadv.py +++ b/autotest/test_gwt_mst06_noadv.py @@ -161,10 +161,7 @@ def check_output(idx, test): assert np.allclose(decay_rate, decay_rate_answer), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_mvt01.py b/autotest/test_gwt_mvt01.py index 4a8c69f33b2..a38091b9063 100644 --- a/autotest/test_gwt_mvt01.py +++ b/autotest/test_gwt_mvt01.py @@ -544,10 +544,7 @@ def check_output(idx, test): assert np.allclose(d0["SFR-1_OUT"], d0["LAK-1_IN"]) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_mvt02.py b/autotest/test_gwt_mvt02.py index 28f81690bef..cc49f432d35 100644 --- a/autotest/test_gwt_mvt02.py +++ b/autotest/test_gwt_mvt02.py @@ -475,10 +475,7 @@ def check_output(idx, test): # print(res) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_mwt01.py b/autotest/test_gwt_mwt01.py index e209bb7992f..d637b1fa631 100644 --- a/autotest/test_gwt_mwt01.py +++ b/autotest/test_gwt_mwt01.py @@ -393,10 +393,7 @@ def check_output(idx, test): check_obs(test) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_mwt02.py b/autotest/test_gwt_mwt02.py index e7ebcecc1d3..db886b0ca0a 100644 --- a/autotest/test_gwt_mwt02.py +++ b/autotest/test_gwt_mwt02.py @@ -473,7 +473,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_obs01.py b/autotest/test_gwt_obs01.py index 1aced44f7ef..eab65a96a4a 100644 --- a/autotest/test_gwt_obs01.py +++ b/autotest/test_gwt_obs01.py @@ -262,10 +262,7 @@ def check_output(idx, test): ), "obs concentrations do not match oc concentrations." -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_prudic2004t2.py b/autotest/test_gwt_prudic2004t2.py index 7879bb11ee8..697a1b819bb 100644 --- a/autotest/test_gwt_prudic2004t2.py +++ b/autotest/test_gwt_prudic2004t2.py @@ -966,10 +966,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_prudic2004t2gwtgwt.py b/autotest/test_gwt_prudic2004t2gwtgwt.py index 31b73a265bb..a9ae64c41c7 100644 --- a/autotest/test_gwt_prudic2004t2gwtgwt.py +++ b/autotest/test_gwt_prudic2004t2gwtgwt.py @@ -950,10 +950,7 @@ def check_output(idx, test): @pytest.mark.slow -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_sft01.py b/autotest/test_gwt_sft01.py index ed2003c8ff1..ef6d2f744e7 100644 --- a/autotest/test_gwt_sft01.py +++ b/autotest/test_gwt_sft01.py @@ -422,10 +422,7 @@ def check_output(idx, test): assert np.allclose(qs, qa), msg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_sft01gwtgwt.py b/autotest/test_gwt_sft01gwtgwt.py index 2daa63c7b8f..7ee5c4c1e1d 100644 --- a/autotest/test_gwt_sft01gwtgwt.py +++ b/autotest/test_gwt_sft01gwtgwt.py @@ -510,10 +510,7 @@ def check_output(idx, test): ), "aquifer concentration does not equal sfr concentration" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_src01.py b/autotest/test_gwt_src01.py index bdb0ff20b2d..7f3f5ceb905 100644 --- a/autotest/test_gwt_src01.py +++ b/autotest/test_gwt_src01.py @@ -253,10 +253,7 @@ def check_output(idx, test): ), "simulated concentrations do not match with known solution." -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_ssm02.py b/autotest/test_gwt_ssm02.py index 976d9db316a..03e8b73dcc0 100644 --- a/autotest/test_gwt_ssm02.py +++ b/autotest/test_gwt_ssm02.py @@ -248,10 +248,7 @@ def check_output(idx, test): vold = v -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_ssm03.py b/autotest/test_gwt_ssm03.py index 1159be9e9c4..150e392be45 100644 --- a/autotest/test_gwt_ssm03.py +++ b/autotest/test_gwt_ssm03.py @@ -256,10 +256,7 @@ def check_output(idx, test): assert q < 0.0, "mass flux for chd must be less than zero" -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_ssm04.py b/autotest/test_gwt_ssm04.py index ee725f7b1e6..2448c7b437d 100644 --- a/autotest/test_gwt_ssm04.py +++ b/autotest/test_gwt_ssm04.py @@ -501,10 +501,7 @@ def check_output(idx, test): istart = istop -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_ssm05.py b/autotest/test_gwt_ssm05.py index 40a6c1acfe3..229b14bd757 100644 --- a/autotest/test_gwt_ssm05.py +++ b/autotest/test_gwt_ssm05.py @@ -310,10 +310,7 @@ def check_output(idx, test): istart = istop -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_uzt01.py b/autotest/test_gwt_uzt01.py index 2a8f516a699..7f2837ef035 100644 --- a/autotest/test_gwt_uzt01.py +++ b/autotest/test_gwt_uzt01.py @@ -558,10 +558,7 @@ def check_output(idx, test): # make_plot(sim, obsvals) -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_gwt_zb01.py b/autotest/test_gwt_zb01.py index eadc344fda7..bb933d17a15 100644 --- a/autotest/test_gwt_zb01.py +++ b/autotest/test_gwt_zb01.py @@ -247,7 +247,7 @@ def build_models(idx, test): return sim, None -def check_output(idx, test, zb6): +def check_output(idx, test): ws = Path(test.workspace) # build zonebudget files @@ -273,7 +273,7 @@ def check_output(idx, test, zb6): # run zonebudget success, buff = flopy.run_model( - zb6, + test.targets.zbud6, "zonebudget.nam", model_ws=ws, silent=False, @@ -415,14 +415,14 @@ def check_output(idx, test, zb6): print(" " + msg) -@pytest.mark.parametrize("idx, name", list(enumerate(cases))) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, workspace=function_tmpdir, targets=targets, build=lambda t: build_models(idx, t), - check=lambda t: check_output(idx, t, targets.zbud6), + check=lambda t: check_output(idx, t), htol=htol, ) test.run() diff --git a/autotest/test_gwtgwt_oldexg.py b/autotest/test_gwtgwt_oldexg.py index f8e86e96e8a..fef038e1c5d 100644 --- a/autotest/test_gwtgwt_oldexg.py +++ b/autotest/test_gwtgwt_oldexg.py @@ -770,10 +770,7 @@ def compare_gwt_to_ref(test): assert np.allclose(res, 0.0, atol=1.0e-6), errmsg -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_mf6_tmp_simulations.py b/autotest/test_mf6_tmp_simulations.py index 263bc236240..693680758d8 100644 --- a/autotest/test_mf6_tmp_simulations.py +++ b/autotest/test_mf6_tmp_simulations.py @@ -108,10 +108,7 @@ def run_mf6(sim, ws): sim.compare() -@pytest.mark.parametrize( - "idx, name", - list(enumerate(get_mf6_models())), -) +@pytest.mark.parametrize("idx, name", enumerate(get_mf6_models())) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_par_gwf01.py b/autotest/test_par_gwf01.py index 2e66ea6ea11..57c38874892 100644 --- a/autotest/test_par_gwf01.py +++ b/autotest/test_par_gwf01.py @@ -219,10 +219,7 @@ def check_output(idx, test): @pytest.mark.parallel -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_par_gwf02.py b/autotest/test_par_gwf02.py index 08ca98a85d4..70ffd2f298d 100644 --- a/autotest/test_par_gwf02.py +++ b/autotest/test_par_gwf02.py @@ -238,10 +238,7 @@ def check_output(idx, test): @pytest.mark.parallel -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): ncpus = domain_grid[idx][0] * domain_grid[idx][1] test = TestFramework( diff --git a/autotest/test_par_gwf03.py b/autotest/test_par_gwf03.py index e1d17807ec4..77d09a1ca8a 100644 --- a/autotest/test_par_gwf03.py +++ b/autotest/test_par_gwf03.py @@ -231,10 +231,7 @@ def check_output(idx, test): @pytest.mark.parallel -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_par_gwf_idomain.py b/autotest/test_par_gwf_idomain.py index 0a8d88c48d2..ce1ae2b0c7a 100644 --- a/autotest/test_par_gwf_idomain.py +++ b/autotest/test_par_gwf_idomain.py @@ -31,10 +31,7 @@ def check_output(idx, test): @pytest.mark.parallel -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_par_gwf_ims_csv.py b/autotest/test_par_gwf_ims_csv.py index d98b405f2f1..0b400b2645d 100644 --- a/autotest/test_par_gwf_ims_csv.py +++ b/autotest/test_par_gwf_ims_csv.py @@ -13,7 +13,7 @@ The result should be a uniform flow field. """ -ex = ["par_gwf_csv"] +cases = ["par_gwf_csv"] dis_shape = [(1, 1, 5)] # global convenience... @@ -24,7 +24,7 @@ def update_ims(idx, ims): from test_par_gwf01 import hclose, ninner, nouter, rclose - name = ex[idx] + name = cases[idx] ims.csv_outer_output_filerecord.set_data(f"{name}.outer.csv") ims.csv_inner_output_filerecord.set_data(f"{name}.inner.csv") return @@ -46,10 +46,7 @@ def check_output(idx, test): @pytest.mark.parallel -@pytest.mark.parametrize( - "idx, name", - list(enumerate(ex)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_par_gwf_newton.py b/autotest/test_par_gwf_newton.py index 78fc5825e08..d8e61ccb5d9 100644 --- a/autotest/test_par_gwf_newton.py +++ b/autotest/test_par_gwf_newton.py @@ -33,10 +33,7 @@ def check_output(idx, test): @pytest.mark.parallel -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_par_gwf_newton_under_relaxation.py b/autotest/test_par_gwf_newton_under_relaxation.py index c8e620bb03f..628a4f0c107 100644 --- a/autotest/test_par_gwf_newton_under_relaxation.py +++ b/autotest/test_par_gwf_newton_under_relaxation.py @@ -47,10 +47,7 @@ def check_output(idx, test): @pytest.mark.parallel -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): ncpus = 2 if idx == 1 else 1 test = TestFramework( diff --git a/autotest/test_par_gwf_pakcc.py b/autotest/test_par_gwf_pakcc.py index ef48dec6927..8064f1421f7 100644 --- a/autotest/test_par_gwf_pakcc.py +++ b/autotest/test_par_gwf_pakcc.py @@ -38,10 +38,7 @@ def build_models(idx, test): @pytest.mark.parallel -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): ncpus = 2 if idx == 1 else 1 test = TestFramework( diff --git a/autotest/test_par_gwf_rewet.py b/autotest/test_par_gwf_rewet.py index 4e78429e5d8..fad3e4b4932 100644 --- a/autotest/test_par_gwf_rewet.py +++ b/autotest/test_par_gwf_rewet.py @@ -31,10 +31,7 @@ def check_output(idx, test): @pytest.mark.parallel -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_par_gwf_xt3d02.py b/autotest/test_par_gwf_xt3d02.py index 04ae659d7d0..a2e954f337a 100644 --- a/autotest/test_par_gwf_xt3d02.py +++ b/autotest/test_par_gwf_xt3d02.py @@ -31,10 +31,7 @@ def check_output(idx, test): @pytest.mark.parallel -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_par_gwt_adv01.py b/autotest/test_par_gwt_adv01.py index 301104f6982..2e9647faa56 100644 --- a/autotest/test_par_gwt_adv01.py +++ b/autotest/test_par_gwt_adv01.py @@ -24,10 +24,7 @@ def check_output(idx, test): @pytest.mark.parallel -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_par_gwt_dsp01.py b/autotest/test_par_gwt_dsp01.py index f7905e0d903..dbdee7a26f9 100644 --- a/autotest/test_par_gwt_dsp01.py +++ b/autotest/test_par_gwt_dsp01.py @@ -24,10 +24,7 @@ def check_output(idx, test): @pytest.mark.parallel -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name, diff --git a/autotest/test_par_gwt_henry.py b/autotest/test_par_gwt_henry.py index 96bb5d53022..ee333c6a9cc 100644 --- a/autotest/test_par_gwt_henry.py +++ b/autotest/test_par_gwt_henry.py @@ -24,10 +24,7 @@ def check_output(idx, test): @pytest.mark.parallel -@pytest.mark.parametrize( - "idx, name", - list(enumerate(cases)), -) +@pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): test = TestFramework( name=name,