diff --git a/README.md b/README.md index 0e9a4a1..ae04bf4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ guardrails.cucumber-expression-match | Developed by | jenisys | |---------------------|----------------| -| Date of development | 2024-06-22 | +| Date of development | 2024-08-14 | | Validator type | rule-following | | License | MIT | | Input/Output | Output | @@ -43,7 +43,7 @@ Check if text follows a specified schema (described by this cucumber-expression) * Dependencies: - - `guardrails-ai>=0.4.5` + - `guardrails-ai>=0.5.4` - `cucumber-expressions>=17.1.0` - `rstr>=3.2.2` diff --git a/cucumber_expression_match.py b/cucumber_expression_match.py index b141abe..1ffc42b 100644 --- a/cucumber_expression_match.py +++ b/cucumber_expression_match.py @@ -85,7 +85,7 @@ class CucumberExpressionMatch(Validator): ## Requirements * Dependencies: - - guardrails-ai>=0.4.5 + - guardrails-ai>=0.5.0 - cucumber-expressions>=17.1.0 - rstr>=3.2.2 diff --git a/py.requirements.txt b/py.requirements.txt index 62bb20b..9ddb63f 100644 --- a/py.requirements.txt +++ b/py.requirements.txt @@ -3,7 +3,7 @@ # ============================================================================ # MAYBE: vale -- https://vale.sh/docs/topics/config/ -guardrails-ai >= 0.4.5 +guardrails-ai >= 0.5.4 cucumber-expressions rstr diff --git a/tests/test_validator.py b/tests/test_validator.py index a26e1d6..f15a412 100644 --- a/tests/test_validator.py +++ b/tests/test_validator.py @@ -1,15 +1,9 @@ from cucumber_expression_match import CucumberExpressionMatch from cucumber_expression_match import ParameterType from guardrails import Guard, OnFailAction -from guardrails.validator_base import ( - PassResult, - FailResult, - ValidationResult -) -from guardrails.guard import ( - ValidationOutcome, - ValidationError -) +from guardrails.errors import ValidationError +from guardrails.guard import ValidationOutcome +from guardrails.validator_base import PassResult, FailResult import pytest @@ -88,6 +82,5 @@ def test_parse_on_failure(self, bad_text, reason): ) with pytest.raises(ValidationError) as exc_info: _result = guard.parse(bad_text) - expected = f"Validation failed for field with errors: Result must match: {self.EXPRESSION}" assert str(exc_info.value) == expected