/
test_utils.py
47 lines (45 loc) · 1.02 KB
/
test_utils.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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
)