Skip to content

Commit 7a78d67

Browse files
committed
fix autotests
1 parent a19a864 commit 7a78d67

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

autotest/prt/test_prt_exg01.py

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
from prt_test_utils import check_budget_data, check_track_data, get_gwf_sim
2929

3030
from framework import TestFramework
31-
from simulation import TestSimulation
3231

3332
simname = "prtexg01"
3433
ex = [simname, f"{simname}bnms"]
@@ -154,17 +153,17 @@ def build_mp7_sim(ctx, idx, ws, mp7, gwf):
154153
return mp
155154

156155

157-
def eval_results(ctx, sim):
158-
print(f"Evaluating results for sim {sim.name}")
159-
simpath = Path(sim.simpath)
156+
def eval_results(ctx, test):
157+
print(f"Evaluating results for sim {test.name}")
158+
simpath = Path(test.workspace)
160159

161160
# check budget data
162-
check_budget_data(simpath / f"{sim.name}_prt.lst", ctx.perlen, ctx.nper)
161+
check_budget_data(simpath / f"{test.name}_prt.lst", ctx.perlen, ctx.nper)
163162

164163
# check particle track data
165-
prt_track_file = simpath / f"{sim.name}_prt.trk"
166-
prt_track_hdr_file = simpath / f"{sim.name}_prt.trk.hdr"
167-
prt_track_csv_file = simpath / f"{sim.name}_prt.trk.csv"
164+
prt_track_file = simpath / f"{test.name}_prt.trk"
165+
prt_track_hdr_file = simpath / f"{test.name}_prt.trk.hdr"
166+
prt_track_csv_file = simpath / f"{test.name}_prt.trk.csv"
168167
assert prt_track_file.exists()
169168
assert prt_track_hdr_file.exists()
170169
assert prt_track_csv_file.exists()
@@ -181,17 +180,14 @@ def test_mf6model(idx, name, function_tmpdir, targets):
181180
sim, ctx = build_sim(idx, str(ws), targets.mf6)
182181
sim.write_simulation()
183182

184-
test = TestFramework()
185-
test.run(
186-
TestSimulation(
187-
name=name,
188-
exe_dict=targets,
189-
exfunc=lambda s: eval_results(ctx, s),
190-
idxsim=0,
191-
make_comparison=False,
192-
),
193-
str(ws),
183+
test = TestFramework(
184+
name=name,
185+
workspace=ws,
186+
targets=targets,
187+
check=lambda s: eval_results(ctx, s),
188+
compare=None,
194189
)
190+
test.run()
195191

196192
# model names
197193
gwfname = get_model_name(idx, "gwf")

0 commit comments

Comments
 (0)