Skip to content

Commit

Permalink
test: use mfnwt in test_gwf_sto01.py, accommodate no dbl prec exes
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Nov 9, 2023
1 parent 1b220d4 commit ee73226
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
24 changes: 15 additions & 9 deletions autotest/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,18 @@ def targets(bin_path) -> Executables:
rb_bin = bin_path / "rebuilt"
tgts = dict()

def try_dbl(name):
p = dl_bin / f"{name}dbl{exe_ext}"
if not p.is_file():
p = dl_bin / f"{name}{exe_ext}"
return p

# downloaded executables
tgts["mf2000"] = dl_bin / f"mf2000{exe_ext}"
tgts["mf2005"] = dl_bin / f"mf2005dbl{exe_ext}"
tgts["mfnwt"] = dl_bin / f"mfnwtdbl{exe_ext}"
tgts["mfusg"] = dl_bin / f"mfusgdbl{exe_ext}"
tgts["mflgr"] = dl_bin / f"mflgrdbl{exe_ext}"
tgts["mf2005"] = try_dbl("mf2005")
tgts["mfnwt"] = try_dbl("mfnwt")
tgts["mfusg"] = try_dbl("mfdbl")
tgts["mflgr"] = try_dbl("mflgr")
tgts["mf2005s"] = dl_bin / f"mf2005{exe_ext}"
tgts["mt3dms"] = dl_bin / f"mt3dms{exe_ext}"
tgts["crt"] = dl_bin / f"crt{exe_ext}"
Expand Down Expand Up @@ -93,7 +99,7 @@ def original_regression(request) -> bool:

@pytest.fixture(scope="session")
def markers(pytestconfig) -> str:
return pytestconfig.getoption('-m')
return pytestconfig.getoption("-m")


def pytest_addoption(parser):
Expand All @@ -104,10 +110,10 @@ def pytest_addoption(parser):
help="TODO",
)
parser.addoption(
"--parallel",
action="store_true",
default=False,
help="include parallel test cases"
"--parallel",
action="store_true",
default=False,
help="include parallel test cases",
)


Expand Down
6 changes: 4 additions & 2 deletions autotest/test_gwf_sto01.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
# storage and compaction data
ske = [6e-4, 3e-4, 6e-4]


# variant SUB package problem 3
def build_model(idx, dir):
name = ex[idx]
Expand Down Expand Up @@ -201,7 +202,9 @@ def build_model(idx, dir):
# build MODFLOW-NWT files
cpth = cmppth
ws = os.path.join(dir, cpth)
mc = flopy.modflow.Modflow(name, model_ws=ws, version=cpth)
mc = flopy.modflow.Modflow(
name, model_ws=ws, version=cpth, exe_name=cmppth
)
dis = flopy.modflow.ModflowDis(
mc,
nlay=nlay,
Expand Down Expand Up @@ -256,7 +259,6 @@ def build_model(idx, dir):


def eval_sto(sim):

print("evaluating storage...")

# get results from listing file
Expand Down

0 comments on commit ee73226

Please sign in to comment.