Skip to content

Commit

Permalink
678: Added testcase that should pass but currently fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-vd-aardweg committed Jul 8, 2024
1 parent e73aaac commit 1ca3e07
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion tests/dflowfm/test_crosssection.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
ZWRiverCrsDef,
)
from hydrolib.core.dflowfm.friction.models import FrictionType

from ..utils import (
assert_files_equal,
test_data_dir,
Expand Down Expand Up @@ -383,3 +382,22 @@ def test_create_and_save_crosslocmodel_correctly_saves_file_with_correct_enum_va
crossloc_model.save(filepath=output_file)

assert_files_equal(output_file, reference_file, skip_lines=[0])

def test_locationtype_is_not_written_for_crosssection(self, tmp_path: Path):
model = CrossLocModel()
model.crosssection.append(
CrossSection(
id="testCrossSection",
branchid="branch1",
chainage=1,
definitionid="testDefinition",
)
)

crs_file = tmp_path / "crsloc.ini"
model.save(filepath=crs_file)

with open(crs_file, "r") as file:
content = file.read()

assert "locationtype" not in content

0 comments on commit 1ca3e07

Please sign in to comment.