Skip to content

Commit 2454c33

Browse files
kallejahnaleaf
authored andcommitted
fixed external file test to compare posix to posix
1 parent 41ee917 commit 2454c33

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

mfsetup/tests/test_mf6_shellmound.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -250,19 +250,15 @@ def test_package_external_file_path_setup(shellmound_model_with_grid,
250250
assert not os.path.isabs(path)
251251

252252
assert m.cfg['intermediate_data']['top'] == \
253-
[os.path.normpath(os.path.join(m.tmpdir, os.path.split(top_filename)[-1]))]
253+
[(m.tmpdir / Path(top_filename).name).as_posix()]
254254
assert m.cfg['intermediate_data']['botm'] == \
255-
[os.path.normpath(os.path.join(m.tmpdir, botm_file_fmt).format(i))
256-
for i in range(m.nlay)]
255+
[(m.tmpdir / botm_file_fmt.format(i)).as_posix() for i in range(m.nlay)]
257256
if not relative_external_paths:
258257
assert m.cfg['dis']['griddata']['top'] == \
259-
[{'filename': os.path.normpath(os.path.join(m.model_ws,
260-
m.external_path,
261-
os.path.split(top_filename)[-1]))}]
258+
[{'filename': (m.model_ws / m.external_path / Path(top_filename).name).as_posix()}]
262259
assert m.cfg['dis']['griddata']['botm'] == \
263-
[{'filename': os.path.normpath(os.path.join(m.model_ws,
264-
m.external_path,
265-
botm_file_fmt.format(i)))} for i in range(m.nlay)]
260+
[{'filename': (m.model_ws / m.external_path / botm_file_fmt.format(i)).as_posix()}
261+
for i in range(m.nlay)]
266262

267263

268264
def test_set_lakarr(shellmound_model_with_dis):

0 commit comments

Comments
 (0)