-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: restructure tests according to src structure
- Loading branch information
1 parent
88e5def
commit b898671
Showing
47 changed files
with
134 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from pytest import fixture | ||
|
||
from intelligence_layer.core import utc_now | ||
from intelligence_layer.evaluation import AggregationOverview, EvaluationOverview | ||
from tests.evaluation.conftest import DummyAggregatedEvaluation | ||
|
||
|
||
@fixture | ||
def dummy_aggregated_evaluation() -> DummyAggregatedEvaluation: | ||
return DummyAggregatedEvaluation(score=0.5) | ||
|
||
|
||
@fixture | ||
def aggregation_overview( | ||
evaluation_overview: EvaluationOverview, | ||
dummy_aggregated_evaluation: DummyAggregatedEvaluation, | ||
) -> AggregationOverview[DummyAggregatedEvaluation]: | ||
return AggregationOverview( | ||
evaluation_overviews=frozenset([evaluation_overview]), | ||
id="aggregation-id", | ||
start=utc_now(), | ||
end=utc_now(), | ||
successful_evaluation_count=5, | ||
crashed_during_evaluation_count=3, | ||
description="dummy-evaluator", | ||
statistics=dummy_aggregated_evaluation, | ||
) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import pytest | ||
|
||
from intelligence_layer.evaluation.aggregation.domain import AggregationOverview | ||
from intelligence_layer.evaluation.evaluation.domain import EvaluationFailed | ||
from tests.evaluation.conftest import DummyAggregatedEvaluation | ||
|
||
|
||
def test_raise_on_exception_for_evaluation_run_overview( | ||
aggregation_overview: AggregationOverview[DummyAggregatedEvaluation], | ||
) -> None: | ||
with pytest.raises(EvaluationFailed): | ||
aggregation_overview.raise_on_evaluation_failure() |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.