28
28
from prt_test_utils import check_budget_data , check_track_data , get_gwf_sim
29
29
30
30
from framework import TestFramework
31
- from simulation import TestSimulation
32
31
33
32
simname = "prtexg01"
34
33
ex = [simname , f"{ simname } bnms" ]
@@ -154,17 +153,17 @@ def build_mp7_sim(ctx, idx, ws, mp7, gwf):
154
153
return mp
155
154
156
155
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 )
160
159
161
160
# 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 )
163
162
164
163
# 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"
168
167
assert prt_track_file .exists ()
169
168
assert prt_track_hdr_file .exists ()
170
169
assert prt_track_csv_file .exists ()
@@ -181,17 +180,14 @@ def test_mf6model(idx, name, function_tmpdir, targets):
181
180
sim , ctx = build_sim (idx , str (ws ), targets .mf6 )
182
181
sim .write_simulation ()
183
182
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 ,
194
189
)
190
+ test .run ()
195
191
196
192
# model names
197
193
gwfname = get_model_name (idx , "gwf" )
0 commit comments