Skip to content

Commit

Permalink
test: add filter_metrics test for TL/default stats
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrugman authored and Simon Brugman committed Jun 23, 2021
1 parent 3a8be31 commit 06dcdd9
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions tests/popmon/test_utils.py
@@ -0,0 +1,47 @@
from popmon.config import config
from popmon.utils import filter_metrics


def test_filter_metrics():
metrics = [
"distinct_pull",
"filled_pull",
"nan_pull",
"mean_pull",
"std_pull",
"p05_pull",
"p10_pull",
"p50_pull",
"p85_pull",
"p95_pull",
"max_pull",
"min_pull",
"fraction_true_trend10_zscore",
"ref_unknown_labels",
"prev1_ks_zscore",
"worst",
"ref_max_prob_diff",
]
expected = [
"distinct_pull",
"filled_pull",
"nan_pull",
"mean_pull",
"std_pull",
"p05_pull",
"p50_pull",
"p95_pull",
"max_pull",
"min_pull",
"fraction_true_trend10_zscore",
"ref_unknown_labels",
"prev1_ks_zscore",
"worst",
"ref_max_prob_diff",
]
assert (
filter_metrics(
metrics, ignore_stat_endswith=[], show_stats=config["limited_stats"]
)
== expected
)

0 comments on commit 06dcdd9

Please sign in to comment.