From 97a766251c7ed3bdd02553e9819c16c4580a7050 Mon Sep 17 00:00:00 2001 From: xjules Date: Tue, 31 Oct 2023 10:26:52 +0100 Subject: [PATCH] Let the contextstring be figured automaticxally --- src/ert/config/queue_config.py | 8 ++++---- tests/unit_tests/config/test_parser_error_collection.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ert/config/queue_config.py b/src/ert/config/queue_config.py index 3424abdc665..e50c4b00638 100644 --- a/src/ert/config/queue_config.py +++ b/src/ert/config/queue_config.py @@ -211,7 +211,7 @@ def _validate_queue_driver_settings( f"'{option_value}' for {option_name} is not a valid format " f"for {queue_type} QUEUE. It must be of " "the format 'mb' or 'gb'.", - option_value.token, + option_value, ) if option_name in string_options[queue_type] and not isinstance( option_value, str @@ -219,7 +219,7 @@ def _validate_queue_driver_settings( raise ConfigValidationError.with_context( f"'{option_value}' for {option_name} is not a valid string type " f"for the {queue_type} QUEUE.", - option_value.token, + option_value, ) if option_name in positive_number_options[queue_type] and ( re.match(r"^\d+(\.\d+)?$", option_value) is None @@ -227,7 +227,7 @@ def _validate_queue_driver_settings( raise ConfigValidationError.with_context( f"'{option_value}' for {option_name} is not a valid integer or float" f" for the {queue_type} QUEUE.", - option_value.token, + option_value, ) if option_name in positive_int_options[queue_type] and ( re.match(r"^\d+$", option_value) is None @@ -235,7 +235,7 @@ def _validate_queue_driver_settings( raise ConfigValidationError.with_context( f"'{option_value}' for {option_name} is not a valid positive integer" f" for the {queue_type} QUEUE.", - option_value.token, + option_value, ) if option_name in bool_options[queue_type] and not option_value in [ "TRUE", diff --git a/tests/unit_tests/config/test_parser_error_collection.py b/tests/unit_tests/config/test_parser_error_collection.py index 609cf266246..1e2c355d460 100644 --- a/tests/unit_tests/config/test_parser_error_collection.py +++ b/tests/unit_tests/config/test_parser_error_collection.py @@ -476,7 +476,7 @@ def test_queue_option_max_running_non_int(): expected_error=ExpectedErrorInfo( line=4, column=32, - end_column=35, + end_column=33, match=r"'ert' for MAX_RUNNING is not a valid positive integer for the LOCAL QUEUE.", ), )