Skip to content

Commit

Permalink
feat[DEI-115]: fix formatting (test columns response_table)
Browse files Browse the repository at this point in the history
  • Loading branch information
wschoonveld committed Aug 2, 2023
1 parent 8aef231 commit 0099a2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion decoimpact/data/parsers/parser_response_curve_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def parse_dict(self, dictionary: Dict[str, Any], logger: ILogger) -> IRuleData:

# check that response table has exactly two columns:
if not len(response_table_list)==2:
raise ValueError("ERROR: response table does not consist of exactly 2 columns (input and output)")
raise ValueError(
"ERROR: response table should have exactly 2 columns"
)

# validate input values to be int/float
if not all(isinstance(m, (int, float)) for m in input_values):
Expand Down
2 changes: 1 addition & 1 deletion tests/data/parsers/test_parser_response_curve_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,6 @@ def test_parse_response_table_items():

# Assert
expected_message = (
"ERROR: response table does not consist of exactly 2 columns (input and output)"
"ERROR: response table should have exactly 2 columns"
)
assert exception_raised.args[0] == expected_message

0 comments on commit 0099a2a

Please sign in to comment.