@@ -48,8 +48,10 @@ def test_usg_disu_load():
4848 ):
4949 if isinstance (value1 , (flopy .utils .Util2d , flopy .utils .Util3d )):
5050 assert np .array_equal (value1 .array , value2 .array )
51- elif isinstance (value1 , list ): #this is for the jagged _get_neighbours list
52- assert np .all ([np .all (v1 == v2 ) for v1 ,v2 in zip (value1 ,value2 )])
51+ elif isinstance (
52+ value1 , list
53+ ): # this is for the jagged _get_neighbours list
54+ assert np .all ([np .all (v1 == v2 ) for v1 , v2 in zip (value1 , value2 )])
5355 elif not isinstance (value1 , flopy .utils .reference .TemporalReference ):
5456 assert value1 == value2
5557
@@ -136,8 +138,11 @@ def test_usg_model():
136138 success , buff = mf .run_model ()
137139 assert success
138140
141+
139142def test_usg_load_01B ():
140- print ("testing 1-layer unstructured mfusg model loading: 01A_nestedgrid_nognc.nam" )
143+ print (
144+ "testing 1-layer unstructured mfusg model loading: 01A_nestedgrid_nognc.nam"
145+ )
141146 pthusgtest = os .path .join (
142147 ".." , "examples" , "data" , "mfusg_test" , "01A_nestedgrid_nognc"
143148 )
@@ -162,11 +167,10 @@ def test_usg_load_01B():
162167 msg = "flopy failed on loading mfusg sms package"
163168 assert isinstance (m .sms , flopy .modflow .mfsms .ModflowSms ), msg
164169
170+
165171def test_usg_load_45usg ():
166172 print ("testing 3-layer unstructured mfusg model loading: 45usg.nam" )
167- pthusgtest = os .path .join (
168- ".." , "examples" , "data" , "mfusg_test" , "45usg"
169- )
173+ pthusgtest = os .path .join (".." , "examples" , "data" , "mfusg_test" , "45usg" )
170174 fname = os .path .join (pthusgtest , "45usg.nam" )
171175 assert os .path .isfile (fname ), "nam file not found {}" .format (fname )
172176
@@ -192,50 +196,66 @@ def test_usg_load_45usg():
192196 msg = "flopy failed on loading mfusg wel package"
193197 assert isinstance (m .wel , flopy .modflow .mfwel .ModflowWel ), msg
194198
199+
195200def test_usg_rch_evt_models01 ():
196201 # this test has RCH nrchop == 1, and EVT nevtop == 1
197- print ("testing unstructured mfusg RCH nrchop == 1, and EVT nevtop == 1: \
198- usg_rch_evt.nam" )
202+ print (
203+ "testing unstructured mfusg RCH nrchop == 1, and EVT nevtop == 1: \
204+ usg_rch_evt.nam"
205+ )
199206 model_ws = os .path .join (
200- '..' , 'examples' , 'data' , 'mfusg_test' , 'rch_evt_tests' )
201- nam = 'usg_rch_evt.nam'
207+ ".." , "examples" , "data" , "mfusg_test" , "rch_evt_tests"
208+ )
209+ nam = "usg_rch_evt.nam"
202210 m = flopy .modflow .Modflow .load (
203- nam , model_ws = model_ws , version = 'mfusg' , exe_name = v )
211+ nam , model_ws = model_ws , version = "mfusg" , exe_name = v
212+ )
204213 m .model_ws = tpth
205214 m .write_input ()
206215 if run :
207216 success , buff = m .run_model ()
208217 assert success
209218
219+
210220def test_usg_rch_evt_models02 ():
211221 # this test has RCH nrchop == 2, and EVT nevtop == 2
212- print ("testing unstructured mfusg RCH nrchop == 2, and EVT nevtop == 2: \
213- usg_rch_evt_nrchop2.nam" )
222+ print (
223+ "testing unstructured mfusg RCH nrchop == 2, and EVT nevtop == 2: \
224+ usg_rch_evt_nrchop2.nam"
225+ )
214226 model_ws = os .path .join (
215- '..' , 'examples' , 'data' , 'mfusg_test' , 'rch_evt_tests' )
216- nam = 'usg_rch_evt_nrchop2.nam'
227+ ".." , "examples" , "data" , "mfusg_test" , "rch_evt_tests"
228+ )
229+ nam = "usg_rch_evt_nrchop2.nam"
217230 m = flopy .modflow .Modflow .load (
218- nam , model_ws = model_ws , version = 'mfusg' , exe_name = v )
231+ nam , model_ws = model_ws , version = "mfusg" , exe_name = v
232+ )
219233 m .model_ws = tpth
220234 m .write_input ()
221235 if run :
222236 success , buff = m .run_model ()
223- assert success
237+ assert success
238+
224239
225240def test_usg_rch_evt_models02a ():
226241 # this test has RCH nrchop == 2, and EVT nevtop == 2
227- print ("testing unstructured mfusg RCH nrchop == 2, and EVT nevtop == 2,\
228- but with fewer irch nodes: than in nodelay[0] usg_rch_evt_nrchop2.nam" )
242+ print (
243+ "testing unstructured mfusg RCH nrchop == 2, and EVT nevtop == 2,\
244+ but with fewer irch nodes: than in nodelay[0] usg_rch_evt_nrchop2.nam"
245+ )
229246 model_ws = os .path .join (
230- '..' , 'examples' , 'data' , 'mfusg_test' , 'rch_evt_tests' )
231- nam = 'usg_rch_evt_nrchop2a.nam'
247+ ".." , "examples" , "data" , "mfusg_test" , "rch_evt_tests"
248+ )
249+ nam = "usg_rch_evt_nrchop2a.nam"
232250 m = flopy .modflow .Modflow .load (
233- nam , model_ws = model_ws , version = 'mfusg' , exe_name = v )
251+ nam , model_ws = model_ws , version = "mfusg" , exe_name = v
252+ )
234253 m .model_ws = tpth
235254 m .write_input ()
236255 if run :
237256 success , buff = m .run_model ()
238- assert success
257+ assert success
258+
239259
240260if __name__ == "__main__" :
241261 test_usg_disu_load ()
@@ -246,4 +266,3 @@ def test_usg_rch_evt_models02a():
246266 test_usg_rch_evt_models01 ()
247267 test_usg_rch_evt_models02 ()
248268 test_usg_rch_evt_models02a ()
249-
0 commit comments