Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamDee committed Nov 12, 2024
1 parent c27e16f commit c7c4a09
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions tests/validations/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,18 +614,6 @@ def test_cumulative_metrics() -> None: # noqa: D
),
),
),
# Metrics with duplicated window or grain_to_date - should get warning
metric_with_guaranteed_meta(
name="what_a_metric",
type=MetricType.CUMULATIVE,
type_params=PydanticMetricTypeParams(
measure=PydanticMetricInputMeasure(name=measure_name),
grain_to_date=TimeGranularity.YEAR,
cumulative_type_params=PydanticCumulativeTypeParams(
grain_to_date=TimeGranularity.HOUR.value,
),
),
),
metric_with_guaranteed_meta(
name="dis_bad",
type=MetricType.CUMULATIVE,
Expand Down Expand Up @@ -688,12 +676,11 @@ def test_cumulative_metrics() -> None: # noqa: D
)

build_issues = validation_results.all_issues
assert len(build_issues) == 4
assert len(build_issues) == 3
expected_substrings = [
"Invalid time granularity",
"Both window and grain_to_date set for cumulative metric. Please set one or the other.",
"Got differing values for `window`",
"Got differing values for `grain_to_date`",
]
check_error_in_issues(error_substrings=expected_substrings, issues=build_issues)

Expand Down

0 comments on commit c7c4a09

Please sign in to comment.