refactor: centralize validation logic with validate_with helper (#412)

* chore: sonarcloud fixes

* chore: coderabbit cr fixes
This commit is contained in:
2025-12-23 13:29:37 +02:00
committed by GitHub
parent 5b4e9c8e11
commit 96c305c557
18 changed files with 452 additions and 834 deletions

View File

@@ -895,7 +895,7 @@ optional_inputs:
self.validator._validate_multi_value_enum("test", "input", valid_values=["only_one"])
raise AssertionError("Should raise ValueError for single value")
except ValueError as e:
assert "at least 2 valid values" in str(e)
assert ">= 2 values" in str(e)
# Should raise ValueError if more than max_values
try:
@@ -906,7 +906,7 @@ optional_inputs:
)
raise AssertionError("Should raise ValueError for 11 values")
except ValueError as e:
assert "at most 10 valid values" in str(e)
assert "<= 10 values" in str(e)
def test_validate_exit_code_list_valid(self):
"""Test exit code list validation with valid values."""