@@ -20,7 +20,7 @@ def pytest_generate_tests(metafunc):
2020 metafunc .parametrize ("example_script" , scripts .values (), ids = scripts .keys ())
2121
2222
23- def compare_heads (compare_fpth , check_path ):
23+ def compare_hds (compare_fpth , check_path ):
2424 from flopy .utils import HeadFile
2525
2626 if compare_fpth .suffix == ".hds" :
@@ -37,12 +37,12 @@ def compare_heads(compare_fpth, check_path):
3737def compare_grb (compare_fpth , check_path ):
3838 from flopy .mf6 .utils import MfGrdFile
3939
40- grb_compare = MfGrdFile (compare_fpth ). _datadict
40+ grb_compare = MfGrdFile (compare_fpth )
4141
4242 # check *.grb files
4343 for f in check_path .rglob ("*.grb" ):
4444 grb = MfGrdFile (f )
45- np .testing .assert_equal (grb_compare , grb ._datadict )
45+ np .testing .assert_equal (grb_compare . _datadict , grb ._datadict )
4646
4747
4848def compare_bud (compare_fpth , check_path ):
@@ -72,16 +72,15 @@ def compare_bud(compare_fpth, check_path):
7272def compare (example_script ):
7373 from pathlib import Path
7474
75- test_name = "test_examples"
7675 check_path = Path (f"{ example_script .parent } /{ example_script .stem } " )
77- compare_path = Path (f"{ example_script .parent .parent .parent } /test/__compare__/{ test_name } " )
76+ compare_path = Path (f"{ example_script .parent .parent .parent } /test/__compare__/test_examples " )
7877
7978 for f in compare_path .glob (f"{ example_script .stem } .*" ):
8079 if f .suffix == ".bud" or f .suffix == ".cbc" :
8180 compare_bud (f , check_path )
8281 if f .suffix == ".hds" or f .match ("*hds.npy" ):
83- compare_heads (f , check_path )
84- elif f .suffix == ".grb" :
82+ compare_hds (f , check_path )
83+ if f .suffix == ".grb" :
8584 compare_grb (f , check_path )
8685
8786
0 commit comments