Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtruong committed Jan 22, 2025
1 parent 8b3692d commit c03b3df
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/trace/test_evaluations.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,9 +813,9 @@ def model_function(col1, col2):

# The expected summary should show that 3 out of 4 predictions matched
expected_results = {"true_count": 3, "true_fraction": 0.75}
assert eval_out["DummyScorer"]["match"] == expected_results, (
"The summary should reflect the correct number of matches"
)
assert (
eval_out["DummyScorer"]["match"] == expected_results
), "The summary should reflect the correct number of matches"


@pytest.mark.asyncio
Expand Down Expand Up @@ -918,9 +918,9 @@ def model_function(col1, col2):

# Assertions for the first scorer
expected_results_dummy = {"true_count": 1, "true_fraction": 1.0 / 3}
assert eval_out["DummyScorer"]["match"] == expected_results_dummy, (
"All concatenations should match the target"
)
assert (
eval_out["DummyScorer"]["match"] == expected_results_dummy
), "All concatenations should match the target"

# Assertions for the second scorer
# Since input1 == col2, and output is col1 + col2, we check if col2 == (col1 + col2)[::-1]
Expand All @@ -930,9 +930,9 @@ def model_function(col1, col2):
# Third row: col2 = "zyx", output = "xyzzyx", output[::-1] = "xyzzyx" -> "zyx" == "xyzzyx" is False
# So all matches are False
expected_results_another_dummy = {"true_count": 0, "true_fraction": 0.0}
assert eval_out["AnotherDummyScorer"]["match"] == expected_results_another_dummy, (
"No matches should be found for AnotherDummyScorer"
)
assert (
eval_out["AnotherDummyScorer"]["match"] == expected_results_another_dummy
), "No matches should be found for AnotherDummyScorer"


@pytest.mark.asyncio
Expand Down

0 comments on commit c03b3df

Please sign in to comment.