@@ -159,7 +159,7 @@ def build_gwf_sim(name, ws, targets):
159159 }
160160
161161
162- def build_prt_sim (idx , name , gwf_ws , prt_ws , targets , cell_ids ):
162+ def build_prt_sim (idx , name , gwf_ws , prt_ws , targets , cell_ids , scratch_buffer = False ):
163163 prt_ws = Path (prt_ws )
164164 gwf_name = get_model_name (name , "gwf" )
165165 prt_name = get_model_name (name , "prt" )
@@ -224,6 +224,7 @@ def build_prt_sim(idx, name, gwf_ws, prt_ws, targets, cell_ids):
224224 track_usertime = times [idx ],
225225 ntracktimes = len (tracktimes ) if times [idx ] else None ,
226226 tracktimes = [(t ,) for t in tracktimes ] if times [idx ] else None ,
227+ scratch_buffer = scratch_buffer ,
227228 )
228229 gwf_budget_file = gwf_ws / f"{ gwf_name } .bud"
229230 gwf_head_file = gwf_ws / f"{ gwf_name } .hds"
@@ -235,10 +236,16 @@ def build_prt_sim(idx, name, gwf_ws, prt_ws, targets, cell_ids):
235236 return sim
236237
237238
238- def build_models (idx , test ):
239+ def build_models (idx , test , scratch_buffer = False ):
239240 gwf_sim , cell_ids = build_gwf_sim (test .name , test .workspace , test .targets )
240241 prt_sim = build_prt_sim (
241- idx , test .name , test .workspace , test .workspace / "prt" , test .targets , cell_ids
242+ idx ,
243+ test .name ,
244+ test .workspace ,
245+ test .workspace / "prt" ,
246+ test .targets ,
247+ cell_ids ,
248+ scratch_buffer ,
242249 )
243250 return gwf_sim , prt_sim
244251
@@ -357,11 +364,12 @@ def check_output(idx, test):
357364@requires_pkg ("syrupy" )
358365@pytest .mark .slow
359366@pytest .mark .parametrize ("idx, name" , enumerate (cases ))
360- def test_mf6model (idx , name , function_tmpdir , targets , benchmark , plot ):
367+ @pytest .mark .parametrize ("scratch_buffer" , [False , True ], ids = ["inmem" , "scratch" ])
368+ def test_mf6model (scratch_buffer , idx , name , function_tmpdir , targets , benchmark , plot ):
361369 test = TestFramework (
362370 name = name ,
363371 workspace = function_tmpdir ,
364- build = lambda t : build_models (idx , t ),
372+ build = lambda t : build_models (idx , t , scratch_buffer ),
365373 check = lambda t : check_output (idx , t ),
366374 plot = lambda t : plot_output (idx , t ) if plot else None ,
367375 targets = targets ,
0 commit comments