MCPcopy
hub / github.com/pathwaycom/pathway / test_custom_count_static

Function test_custom_count_static

python/pathway/tests/test_reducers.py:39–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37
38
39def test_custom_count_static():
40 left = T(
41 """
42 pet | owner | age
43 dog | Alice | 10
44 dog | Bob | 9
45 cat | Alice | 8
46 dog | Bob | 7
47 """
48 )
49
50 left_res = left.groupby(left.pet).reduce(left.pet, cnt=custom_cnt())
51
52 assert_table_equality(
53 left_res,
54 T(
55 """
56 pet | cnt
57 dog | 3
58 cat | 1
59 """,
60 id_from=["pet"],
61 ),
62 )
63
64
65def test_custom_count_dynamic():

Callers

nothing calls this directly

Calls 3

TFunction · 0.90
reduceMethod · 0.45
groupbyMethod · 0.45

Tested by

no test coverage detected