Skip to content

Commit

Permalink
Change test to correct for floaping point precisions issues
Browse files Browse the repository at this point in the history
  • Loading branch information
naddeoa committed Mar 25, 2024
1 parent 8021963 commit acda78a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/langkit/validators/test_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def test_trigger_or():
validator = MultiColumnConstraintValidator(
MultiColumnConstraintValidatorOptions(
(
ConstraintValidatorOptions("prompt.similarity.injection", upper_threshold=0), # does
ConstraintValidatorOptions("prompt.stats.char_count", upper_threshold=0), # does
ConstraintValidatorOptions("prompt.topics.medicine", upper_threshold=0.5), # doesn't trigger
ConstraintValidatorOptions("prompt.topics.advice", upper_threshold=0.5), # doesn't trigger
),
Expand Down Expand Up @@ -435,9 +435,9 @@ def test_trigger_or():
assert result.validation_results.report == [
ValidationFailure(
id="0",
metric="prompt.similarity.injection",
details="Value 0.5880643725395203 is above threshold 0",
value=0.5880643725395203,
metric="prompt.stats.char_count",
details="Value 57 is above threshold 0",
value=57,
upper_threshold=0,
lower_threshold=None,
allowed_values=None,
Expand Down

0 comments on commit acda78a

Please sign in to comment.