Skip to content

Commit

Permalink
remove temp path checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mjreno authored and mjreno committed Oct 28, 2024
1 parent 341b3f1 commit f39244e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 23 deletions.
22 changes: 8 additions & 14 deletions flopy4/compound.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,25 +381,19 @@ def load(cls, f, **kwargs) -> "MFList":
tokens = strip(line).split(maxsplit=maxsplit)
assert len(tokens) == sum(param_cols)
icol = 0
for i, p in enumerate(param_lists):
if param_cols[i] == 1:
for i in range(len(param_types)):
row_l = []
for j in range(param_cols[i]):
if param_types[i] == "integer":
param_lists[i].append(int(tokens[icol]))
row_l.append(int(tokens[icol]))
elif param_types[i] == "double":
param_lists[i].append(float(tokens[icol]))
row_l.append(float(tokens[icol]))
else:
param_lists[i].append(tokens[icol])
row_l.append(tokens[icol])
icol += 1
if param_cols[i] == 1:
param_lists[i].append(row_l[0])
else:
row_l = []
for j in range(param_cols[i]):
if param_types[i] == "integer":
row_l.append(int(tokens[icol]))
elif param_types[i] == "double":
row_l.append(float(tokens[icol]))
else:
row_l.append(tokens[icol])
icol += 1
param_lists[i].append(row_l)

if blk_params and "dimensions" in blk_params:
Expand Down
9 changes: 0 additions & 9 deletions test/test_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,26 +144,17 @@ def test_load_sim(tmp_path):
assert "exchanges" in s.nam
assert "solutiongroup" in s.nam
assert "tdis6" in s.nam["timing"]
assert s.nam["timing"]["tdis6"].value == f"{tmp_path}/sim.tdis"
assert "mtype" in s.nam["models"].params["models"]
assert "mfname" in s.nam["models"].params["models"]
assert "mname" in s.nam["models"].params["models"]
assert s.nam["models"].params["models"]["mtype"][0] == "GWF6"
assert (
s.nam["models"].params["models"]["mfname"][0]
== f"{tmp_path}/{name}.nam"
)
assert s.nam["models"].params["models"]["mname"][0] == f"{name}"
assert "slntype" in s.nam["solutiongroup"].params["solutiongroup"]
assert "slnfname" in s.nam["solutiongroup"].params["solutiongroup"]
assert "slnmnames" in s.nam["solutiongroup"].params["solutiongroup"]
assert (
s.nam["solutiongroup"].params["solutiongroup"]["slntype"][0] == "ims6"
)
assert (
s.nam["solutiongroup"].params["solutiongroup"]["slnfname"][0]
== f"{tmp_path}/{name}.ims"
)
assert (
s.nam["solutiongroup"].params["solutiongroup"]["slnmnames"][0]
== f"{name}"
Expand Down

0 comments on commit f39244e

Please sign in to comment.