Skip to content

Commit

Permalink
Make tests conform to ewatercycle 2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
BSchilperoort committed Sep 18, 2024
1 parent f5272ba commit 3cdefe8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/test_forcing.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ def test_saved_yaml_content(self, forcing, tmp_path):
"""\
start_time: '1989-01-02T00:00:00Z'
end_time: '1999-01-02T00:00:00Z'
shape: Rhine.shp
filenames: {}
forcing_file: marrmot.mat
"""
)
Expand All @@ -143,7 +145,7 @@ def test_saved_yaml_content(self, forcing, tmp_path):
def test_saved_yaml(self, forcing, tmp_path):
saved_forcing = MarrmotForcing.load(tmp_path)
# shape should is not included in the yaml file
forcing.shape = None
forcing.shape = forcing.directory / "Rhine.shp"

assert forcing == saved_forcing

Expand Down
4 changes: 3 additions & 1 deletion tests/test_model_m01.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def test_str(self, model, forcing_file):
[
"MarrmotForcing(start_time='1989-01-01T00:00:00Z', ",
f"end_time='1992-12-31T00:00:00Z', directory={repr(Path(forcing_file).parent)}, ",
"shape=None, forcing_file='BMI_testcase_m01_BuffaloRiver_TN_USA.mat')",
"shape=None, ",
"filenames={}, ",
"forcing_file='BMI_testcase_m01_BuffaloRiver_TN_USA.mat')",
]
)
expected = f"parameter_set=None forcing={expected_forcing}"
Expand Down

0 comments on commit 3cdefe8

Please sign in to comment.