Skip to content

Commit

Permalink
fix other test :)
Browse files Browse the repository at this point in the history
  • Loading branch information
CindyvdVries committed Aug 12, 2024
1 parent ed7373a commit 21e004b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion decoimpact/data/parsers/validation_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,5 @@ def validate_type(variable: Any, name: str, expected_type: Any):
if not isinstance(variable, expected_type):
raise ValueError(
f"The inputfield {name} must be of type {expected_type.__name__}, "
f"but is a {type(variable).__name__}"
f"but is of type {type(variable).__name__}"
)
6 changes: 1 addition & 5 deletions tests/data/parsers/test_parser_filter_extremes_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,7 @@ def test_parse_wrong_dict_to_rule_data_logic():
("peaks", ""),
("troughs", ""),
("test", "Extreme_type must be one of: [peaks, troughs]"),
(
1,
"Extreme_type must be a string, \
received: 1",
),
(1, "The inputfield test_var must be of type str, " "but is of type int"),
],
)
def test_validate_extreme_type(extreme_type: str, expected_message: str):
Expand Down
2 changes: 1 addition & 1 deletion tests/data/parsers/test_validation_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,5 +234,5 @@ def test_validate_type_incorrect_input():
# Assert
assert (
exception_raised.args[0] == "The inputfield test_var must be of type int, "
"but is a str"
"but is of type str"
)

0 comments on commit 21e004b

Please sign in to comment.