Skip to content

Commit

Permalink
[telemac] added iceland.slf file + changed tests accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsail committed May 19, 2024
1 parent c44a011 commit fdd633f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
from thalassa import normalization

ADCIRC_NC = DATA_DIR / "fort.63.nc"
SELAFIN = DATA_DIR / "r3d_tidal_flats.slf"
SELAFIN = DATA_DIR / "iceland.slf"

@pytest.mark.parametrize(
"file,variable",
[
pytest.param(ADCIRC_NC, "zeta"),
pytest.param(SELAFIN, "U"),
pytest.param(SELAFIN, "S"),
],
)

Expand Down
Binary file added tests/data/iceland.slf
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/normalization_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"ds,expected_fmt",
[
pytest.param(api.open_dataset(DATA_DIR / "fort.63.nc", normalize=False), THALASSA_FORMATS.ADCIRC, id="ADCIRC"),
pytest.param(api.open_dataset(DATA_DIR / "r3d_tidal_flats.slf", normalize=False), THALASSA_FORMATS.TELEMAC, id="TELEMAC"),
pytest.param(api.open_dataset(DATA_DIR / "iceland.slf", normalize=False), THALASSA_FORMATS.TELEMAC, id="TELEMAC"),
pytest.param(xr.Dataset(), THALASSA_FORMATS.UNKNOWN, id="Unknown"),
],
)
Expand All @@ -25,7 +25,7 @@ def test_infer_format(ds, expected_fmt):
"path,expected",
[
pytest.param(DATA_DIR / "fort.63.nc", True, id="ADCIRC"),
pytest.param(DATA_DIR / "r3d_tidal_flats.slf", True, id="TELEMAC"),
pytest.param(DATA_DIR / "iceland.slf", True, id="TELEMAC"),
pytest.param(__file__, False, id="Unknown"),
],
)
Expand Down

0 comments on commit fdd633f

Please sign in to comment.