Skip to content

Commit

Permalink
feat: Update some failing test, with extra.allow, unknown keywords no…
Browse files Browse the repository at this point in the history
…w not ignored. (#622)
  • Loading branch information
MRVermeulenDeltares committed Apr 19, 2024
1 parent c0af81c commit 639f555
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/dflowfm/test_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def test_bridge_construction_with_parser(self):
assert bridge.friction == 70
assert bridge.length == 9.75

def test_bridge_with_unknown_parameter_is_ignored(self):
def test_bridge_with_unknown_parameter_is_not_ignored(self):
parser = Parser(ParserConfig())

input_str = inspect.cleandoc(
Expand Down Expand Up @@ -475,7 +475,7 @@ def test_bridge_with_unknown_parameter_is_ignored(self):
wrapper = WrapperTest[Bridge].parse_obj({"val": document.sections[0]})
bridge = wrapper.val

assert bridge.dict().get("unknown") is None # type: ignore
assert bridge.unknown == '10.0'

assert bridge.id == "RS1-KBR31"
assert bridge.name == "RS1-KBR31name"
Expand Down Expand Up @@ -1617,7 +1617,7 @@ def test_weir_comments_construction_with_parser(self):
assert weir.comments.crestwidth is None
assert weir.comments.usevelocityheight == "My own special comment 2"

def test_weir_with_unknown_parameter_is_ignored(self):
def test_weir_with_unknown_parameter_is_not_ignored(self):
parser = Parser(ParserConfig())

input_str = inspect.cleandoc(
Expand Down Expand Up @@ -1648,7 +1648,7 @@ def test_weir_with_unknown_parameter_is_ignored(self):
wrapper = WrapperTest[Weir].parse_obj({"val": document.sections[0]})
weir = wrapper.val

assert weir.dict().get("unknown") is None # type: ignore
assert weir.unknown == '10.0'

assert weir.id == "weir_id"
assert weir.name == "weir"
Expand Down Expand Up @@ -2184,7 +2184,7 @@ def test_weir_comments_construction_with_parser(self):
assert struct.comments.gateopeningwidth is None
assert struct.comments.usevelocityheight == "My own special comment 2"

def test_general_structure_with_unknown_parameter_is_ignored(self):
def test_general_structure_with_unknown_parameter_is_not_ignored(self):
parser = Parser(ParserConfig())

input_str = inspect.cleandoc(
Expand Down Expand Up @@ -2239,7 +2239,7 @@ def test_general_structure_with_unknown_parameter_is_ignored(self):
wrapper = WrapperTest[GeneralStructure].parse_obj({"val": document.sections[0]})
struct = wrapper.val

assert struct.dict().get("unknown") is None # type: ignore
assert struct.unknown == '10.0'

assert struct.id == "id"
assert struct.name == "extravagante_waarde"
Expand Down

0 comments on commit 639f555

Please sign in to comment.